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 transfer 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 any 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 has been cleaned, a new gasket should be used, or a new one can be made out of oil-resistant high-temperature RTV gasket maker. The latter is preferred for oil pans with damage to the gasket mating surface.