Generations of television comedies have gotten laughs by having a character's cake collapse, just when it's terribly important to impress a guest. In real life, cakes aren't quite that finicky, but they fall often enough to be frustrating for novice bakers. It's especially maddening when you've baked the cake successfully, only to have it fall as it cools. Cakes deflate for several reasons, and most can be avoided.
A Quick Cake Primer
Your cake gets its texture and lift from a complex interaction of ingredients. Its rise comes from carbon dioxide gas created by baking soda or baking powder, or from air trapped in beaten egg whites. Bubbles from those sources are trapped by two kinds of proteins -- the gluten in your flour and the albumin in the egg whites. Those set and become firm, holding the air bubbles in place as they expand in the oven's heat. Sugar, fat and egg yolks soften the texture of the proteins, making the cake's crumb tender and delicate rather than chewy and breadlike.
Cakes may fall while cooling because they're not baked thoroughly. A cake may appear to be fully risen and the crust will be uniformly golden, but the flour and eggs aren't completely set. When you pull your cake out of the oven, the countless pockets of air inside begin to cool. Until then they act like miniature hot-air balloons, holding up the cake's dome. If the cake's crumb structure hasn't firmed up when that happens, the cake will fall. The solution is to bake the cake longer, turning down the heat or covering its crust with foil to prevent overbrowning. It's done when a wooden toothpick or skewer inserted into the middle comes out clean, and the sides will begin to pull away from the pan.
Even in a perfectly baked cake, the proteins and starches in the flour remain slightly soft while they're hot and reach full strength only when they cool to room temperature. If you cool your cake gently, they'll solidify about as fast as the air bubbles shrink -- and the result is a cake that keeps its shape. If your cake is in a cold draft or too near the air conditioner, it can drop before its supporting structure firms up. Turning the cake out too soon onto a cooling rack can have the same effect.
Angel's food cakes are especially delicate and require careful handling. Most pans have metal tabs at the sides so you can invert the cake while it cools. The bottom and sides cling to the tube pan, holding themselves in place, and gravity keeps the cake fully expanded. If you allow the cake to cool without inverting, the delicate egg whites often can't support the cake's weight and it will collapse into a sad and shrunken doughnut shape. If your tube pan lacks the special tabs for upside-down cooling, place a funnel on your counter with the narrow spout pointing up. Place the tube of your tube pan over the funnel, and it will hold your angel-food cake upside down while it cools.