Corrosion is an electrochemical process that slowly destroys most metals over time. When metals are exposed to oxygen, either in the air or underwater, the oxygen snatches up electrons, creating what we call metal "oxides." One of the most common corrosive oxides is iron oxide, aka rust.
But not all oxides expose the underlying metal to corrosion. When titanium comes into contact with oxygen, it forms a thin layer of titanium dioxide (TiO2) on its surface. This oxide layer actually protects the underlying titanium from corrosion caused by most acids, alkalis, pollution and saltwater.
Titanium's natural anti-corrosive properties make it the ideal material not only for aircraft, but also for undersea components that are exposed to highly corrosive saltwater. Ship propellers are almost always made from titanium, and so are the ship's internal ballast and piping systems, and onboard hardware exposed to seawater.