Cakes need to be completely cool before you attempt to frost them, lay on fondant or apply other decorations. Cakes can stay in the baking pan to cool overnight, but you'll need to do a little work after taking them out of the oven to ensure the cakes retain their shapes and consistency.
After the Oven
When your cakes have finished baking, remove the pans from your oven and let them cool in the pans for about 10 to 15 minutes. Then use a knife to loosen the cake around the edges of the pan and place the pan upside down on a cooling rack to allow the cake to fall free from the pan. Wrap the cake in plastic wrap and place it back into the pan to finish cooling it overnight. The plastic wrap helps prevent moisture loss. If you plan to leave the cake out to cool for just a few hours, simply cover it with a clean hand towel. The towel allows some air to be exchanged, preventing the possibility of a sticky mess.
You may have trouble removing the cake from its pan if it's left in for too long. If you're having problems removing the cake, attempt to loosen it by putting it back in the oven for about three minutes at 250 degrees. If possible, consider using cooling racks rather than allowing the cake to cool in the pan overnight. Wire cooling racks allow better air circulation for uniform cooling.
Some bakers say that wrapping a cake in plastic wrap causes the cake to develop a "sticky" coating. However, the alternative -- leaving the cake exposed to air -- can cause the cake to become dried out. If you find there's a sticky sheen to the top of your cake, apply a light dusting of powdered sugar or spread a thin glaze made from powdered sugar and water. The powdered sugar helps dry out the top of the cake, making it easier to decorate.
If you don't plan on frosting your cake within a few days, wrap it in in several layers of plastic wrap and place it in the freezer. You also can use an air-tight container to store the cake in a freezer. Frozen cake that's kept free from air exposure should last several months. When you're ready to decorate the cake, simply take it out of the freezer and let it sit for about half an hour.