Nitinol's unusual properties are derived from a reversible solid-state phase transformation known as a martensitic transformation, between two different martensite crystal phases, requiring  of mechanical stress.
At high temperatures, nitinol assumes an interpenetrating simple cubic structure referred to as austenite (also known as the parent phase).  At low temperatures, nitinol spontaneously transforms to a more complicated monoclinic crystal structure known as martensite (daughter phase).  There are four transition temperatures associated to the austenite-to-martensite and martensite-to-austenite transformations. Starting from full austenite, martensite begins to form as the alloy is cooled to the so-called martensite start temperature, or M, and the temperature at which the transformation is complete is called the martensite finish temperature, or M. When the alloy is fully martensite and is subjected to heating, austenite starts to form at the austenite start temperature, A, and finishes at the austenite finish temperature, A.
The cooling/heating cycle shows thermal hysteresis. The hysteresis width depends on the precise nitinol composition and processing. Its typical value is a temperature range spanning about 20–50 °C (36–90 °F) but it can be reduced or amplified by alloying and processing.
Crucial to nitinol properties are two key aspects of this phase transformation.  First is that the transformation is "reversible", meaning that heating above the transformation temperature will revert the crystal structure to the simpler austenite phase. The second key point is that the transformation in both directions is instantaneous.
Martensites crystal structure (known as a monoclinic, or B19 structure) has the unique ability to undergo limited deformation in some ways without breaking atomic bonds. This type of deformation is known as twinning, which consists of the rearrangement of atomic planes without causing slip, or permanent deformation. It is able to undergo about 6–8% strain in this manner.  When martensite is reverted to austenite by heating, the original austenitic structure is restored, regardless of whether the martensite phase was deformed. Thus the shape of the high temperature austenite phase is "remembered," even though the alloy is severely deformed at a lower temperature. 
A great deal of pressure can be produced by preventing the reversion of deformed martensite to austenite—from  to, in many cases, more than . One of the reasons that nitinol works so hard to return to its original shape is that it is not just an ordinary metal alloy, but what is known as an intermetallic compound. In an ordinary alloy, the constituents are randomly positioned in the crystal lattice; in an ordered intermetallic compound, the atoms (in this case, nickel and titanium) have very specific locations in the lattice.  The fact that nitinol is an intermetallic is largely responsible for the complexity in fabricating devices made from the alloy.
To fix the original "parent shape," the alloy must be held in position and heated to about . This process is usually called shape setting. A second effect, called superelasticity or pseudoelasticity, is also observed in nitinol.  This effect is the direct result of the fact that martensite can be formed by applying a stress as well as by cooling.  Thus in a certain temperature range, one can apply a stress to austenite, causing martensite to form while at the same time changing shape.  In this case, as soon as the stress is removed, the nitinol will spontaneously return to its original shape.  In this mode of use, nitinol behaves like a super spring, possessing an elastic range 10 to 30 times greater than that of a normal spring material.  There are, however, constraints: the effect is only observed up to about 40 °C (72 °F) above the A temperature. This upper limit is referred to as M, which corresponds to the highest temperature in which it is still possible to stress-induce the formation of martensite. Below M, martensite formation under load allows superelasticity due to twinning. Above M, since martensite is no longer formed, the only response to stress is slip of the austenitic microstructure, and thus permanent deformation.
Nitinol is typically composed of approximately 50 to 51% nickel by atomic percent (55 to 56% weight percent). Making small changes in the composition can change the transition temperature of the alloy significantly. Transformation temperatures in nitinol can be controlled to some extent, where A temperature ranges from about . Thus, it is common practice to refer to a nitinol formulation as "superelastic" or "austenitic" if A is lower than a reference temperature, while as "shape memory" or "martensitic" if higher. The reference temperature is usually defined as the room temperature or the human body temperature ().
One often-encountered effect regarding nitinol is the so-called R-phase.  The R-phase is another martensitic phase that competes with the martensite phase mentioned above. Because it does not offer the large memory effects of the martensite phase, it is usually of non practical use.