Rust is a type of corrosion. It happens to iron and its alloys when it is exposed to air or water for a long time. Rust slowly decomposes iron into other chemicals, because of a reaction with the oxygen molecules. Both air and water are needed for rust. Almost all metals corrode but they can be protected by covering with paint, a coating of oil or grease or even plastic. Sacrificial protection or industrial galvanizing can also work. Alloys (mixes of metals) such as stainless steel, rust more slowly than pure iron. When iron rusts, it becomes red or brown, and the metal eventually decays.
Rust appears on metal if it is left outside in the damp air. For example, rust occurs mostly in cracks of alloys or metals. Rain water can enter the cracks and stay in the cracks, and cause the metal to corrode. Eventually it becomes rust. Iron is not strong after it rusts.
Some metals, such as aluminium, titanium, and stainless steel form a very thin coating of tough corrosion on the metal. The metal cannot continue corroding because the coating isolates the rest of the metal from the source of oxygen. This is why aluminium keeps its shine. It also makes aluminium seem very unreactive, even though it can react with water. Rusting iron makes iron oxides that are not tough, so air and water continue to get in and the iron continues to rust.