Cut open an apple and it looks solid, but it’s not. The flesh of an apple is full of tiny pockets of air between its cells. These pockets make up roughly a quarter of the apple’s total volume, which is why apples are noticeably lighter than they look.
That trapped air is why apples float. Anything less dense than water bobs to the top, and an apple just barely qualifies. It’s also why a game called “bobbing for apples” exists at all - try the same game with pears and you’d be diving to the bottom of the bucket.
The air also explains why a fresh apple goes “crunch” when you bite it. Your teeth burst all those little air-filled cells at once, releasing a tiny pop with every bite.