NHE functions through a process known as secondary active transport, which relies on the electrochemical gradient of sodium ions created by the sodium-potassium pump (Na+/K+-ATPase). In this process, NHE exchanges one intracellular H+ ion for one extracellular Na+ ion, effectively regulating the intracellular pH by removing excess H+ ions.