Corrosion is the slow destruction of a material by chemical reactions with substances around it. Rusting is the corrosion of iron, and it needs both air (oxygen) and water. It is prevented by keeping these away with a barrier, or by attaching a more reactive metal that corrodes first.
Most metals in use are alloys: mixtures of a metal with other elements, chosen to give better properties than the pure metal.
Other materials are chosen in the same way. Glass and clay ceramics are hard but brittle. Polymers depend on the monomer and on the conditions used to make them. A composite combines two materials: a reinforcement of fibres or fragments set in a matrix that binds it together.