Oak leaves can provide apples. Apples can also be obtained through villager trading and found in village and stronghold chests. Gathering wood can therefore provide food alongside building materials.
Eating an apple restores hunger. Apples are ingredients for golden apples, which are separate items rather than alternative names for ordinary apples. Feeding apples to young horses helps them grow.
This article covers ordinary apples in Java and Bedrock. Early Java history differs from modern hunger-based food mechanics: Mojang's historical account describes apples restoring health when introduced in Java version 0.31. That historical behavior should not be applied to current food use.