Shape memory alloys (SMA) remember their original shape and return to it after being heated. Similar to how a liquid transforms into a gas when boiled, SMAs undergo a phase transformation when heated or cooled. The phase transformation occurs with the movement of atoms, which is invisible to the naked eye.
Source:
phys.org