Air bubbles form in cake batter during mixing. If not released before baking, these bubbles cause holes to form in the cake. The holes don't affect the taste of the cake, but are aesthetically unappealing. Foam cakes such as angel food cakes are naturally more porous, while butter cakes have a dense, firm texture. To maintain that dense texture, minimize air bubbles through proper mixing techniques and remove air bubbles before you put the cake in the oven.
Follow the package or recipe directions carefully. Use a glass measuring cup to measure liquids accurately.
Mix the cake until it is creamy and the ingredients are fully incorporated. Avoid over-mixing, though, which can add more air bubbles and toughen the cake.
Prepare the cake pan by greasing and flouring it according to the recipe directions. Pour the cake batter slowly into one corner and allow the batter to spread to release air bubbles.
Tap the cake on the counter a few times before putting it in the oven to release any remaining air bubbles and allow them to rise to the surface.