What’s the difference between a penetrating and a lubricating oil?

Penetrating oils are used to free stuck nuts, bolts, locks, etc. that usually contain rust and corrosion. Lubricating oils are used to prevent and protect those parts from becoming stuck in the first place, while also quieting squeaks or noise that comes from metal parts rubbing together.