Dear student,
Rusting occurs when iron is exposed to atmosphere. In atmosphere there is moisture and oxygen with which it reacts to form rust. Rusting of iron is irreversible therefore it is a chemical change.
4Fe + 6H2O + 3O2 → 4Fe(OH)3
This decomposes to form Fe2O3.xH2O, which is rust.
On the other hand magnetization of iron is physical change because iron gets demagnetized as soon as the magnetic field is removed. Thus it is easily reversible. Hence, it is a physical change.
Regards.