RuneScape Classic Wiki
The main RuneScape Wiki has an article on: Cake
The Old School RuneScape Wiki also has an article on Cake.

Cake is a type of food that heals 12 Hits in three bites. Cumulatively, one cake heals as much as a lobster. Lobsters are a better option in situations where the player needs to heal quickly, like when fighting aggressive monsters. Cakes are most useful for healing in safer situations, like when fighting non-aggressive monsters or to heal damage taken from agility obstacles.

At level 5 thieving, cakes can be stolen from the Baker's Stall for 16 thieving experience.

They can also be made with by players with level 40 cooking by mixing flour, eggs, and milk in a cake tin for 120 experience.

A chocolate bar can be used with cake to make chocolate cake which heals a greater amount of hits, but for no extra cooking experience.