If an oil pan gasket leaks, it is best to replace the gasket by removing the old gasket and gluing the new gasket onto the correct position of the oil pan. It is also possible to use a silicon gasket sealer by applying it to the place where the gasket goes and allowing it to harden.
To replace the gasket, place the car on a level surface, and position a container under the oil pan. Use a wrench to loosen the drain plug, and allow the oil to drain out until no more oil drips out after a minute. Remove the oil pan by removing the bolts, using the car's manual for specific instructions if necessary. Use a solvent to clean the oil pan, and make sure the pan does not have any cracks.
Replace the gasket with a new O-ring type gasket or silicon gasket sealer. When removing the old gasket, use a plastic tool to prevent damage to the aluminum. Reattach the bolts to replace the oil pan, and add new oil. Start the car, allow it to run for a couple of minutes, turn off the car, and check to make sure no more oil leaks. If the car leaks oil after replacing the gasket, the oil pan may require replacement.