Shape memory alloys are alloys (metal composites) that can be deformed and then return to their initial shape when heated; this means they can remember their original shape and come back to it under certain circumstances.
A well-known type of shape memory alloys (SMA) is nickel-titanium (NiTi) alloys, which are commonly known as "Nitinol". The "memory effect" can be explained by considering that the phases of the crystal structure may change upon deformation but they will always return to their most stable form (that is their initial form) when heated at certain temperatures.