TMR operates based on the principle of spin-dependent tunneling. When the magnetizations in the ferromagnetic layers are parallel, the resistance is low because the electrons with matching spin states can easily tunnel through the insulator. Conversely, when the magnetizations are antiparallel, the resistance is high due to the mismatch in spin states, which makes tunneling less probable. This difference in resistance is quantified as the TMR ratio.