Peaches are a type of fruit called a drupe. In drupes, the pericarp is made up of the endocarp (outer shell of the pit), mesocarp (juicy flesh), and exocarp (outer skin).
Apples are a type of fruit called a pome. In pomes, the pericarp is just the core of the fruit, made up of the endocarp (tough, thin layer surrounding the seeds), mesocarp (the flesh of the core), and the endocarp (the outer later of the core, which is fused to the edible flesh of the apple). The part of the apple we eat is not derived from the ovary at all, but is an enlargement of the flower receptacle.
*Pell, S.K., Angell, B. (2016). A botanist’s vocabulary: 1300 terms explained and illustrated. Portland: Timber Press.