The oil pan seals off the bottom portion of the engine, and has an opening on it with a plug in it for easy oil removal. The pan also serves as a means to cool the oil, allowing the heat from the oil to tranfer though the metal of the oil pan to the air passing by underneath the vehicle.
For some applications, usually in high-performance vehicles which don't get much air flowing underneath, an additional means of cooling the oil is added. This is usually achieved with an oil cooler mounted in front of the radiator.
Cleaning an Oil Pan
After the oil pan is removed, there may be a lot of unwanted material in the bottom, and the gasket may have come apart in the process. Brake parts cleaner can easily break up the material in the bottom of the pan, and most gaskets can be pulled off by hand. Wipe the oil pan clean; you don't want aby brake parts cleaner to mix with the new oil. Don't use highly abrasive methods to remove gaskets, or the new gasket may leak.
After the pan is clean, a new gasket should be used, or made out of oil-resistant high-temperature RTV gasket maker.