Cake pans are sometimes left with hard, burnt bits of batter after you've baked in them, resulting in a difficult cleanup. Lining the pan with aluminium foil before pouring in the batter can make your cleanup job a lot easier. A foil liner also makes it possible to lift the cake, brownies or bars out of the pan in one easy motion, leaving nothing behind in the pan. Foil can be greased or sprayed down as you normally would do to the pan before baking.
Tear off a piece of foil long enough to cover the sides and bottom of the pan and still have about 7.5 cm (3 inches) left over. Tear another piece that will go across the pan perpendicular to the first, again making it long enough to cover the sides, bottom and a little left over.
Push the centre of the first the foil piece into the pan, smoothing it into the corners and rubbing it along the edges of the cake pan so the foil takes on the shape of the pan bottom and sides. Leave some foil hanging out at either side of the pan.
Press the second piece of foil into the pan perpendicular to the first, covering any exposed areas of the pan bottom. Smooth the foil into place as you did in Step 2.
Grease the foil-lined pan as you would without foil, using butter, non-stick cooking spray or vegetable oil. Pour in the batter and bake as you normally would.
Remove the pan from the oven when the cake (or other baked good) is done baking. Set it aside to cool. Pull up on the foil ends to remove the entire cake from the pan at once.
You may find it easier to shape the foil by flipping the pan upside down, then pushing the foil over it. Remove the foil, then flip the pan right-side-up and insert the shaped foil. This may be helpful for round or oddly shaped cake pans.
Be sure the foil doesn't tear when pressing it in place, or the batter will seep through to the pan, which will make it hard to clean later.