Shape memory alloys are alloys (metal composites) that after being deformed return to their initial shape when heated; this means they can “remember” their original shape and return to it under certain circumstances.
A well-known type of shape memory alloys (SMA) are nickel-titanium (NiTi) alloys, which are commonly known as "Nitinol". The "memory effect" can be explained by considering that while the crystal structure deforms under stress, heating it to a certain temperature allows it to return to the most stable state (that is the initial form).