The ionic gradients across cell membranes generate a transmembrane voltage that regulates the function of numerous membrane proteins such as ion channels, transporters, pumps and enzymes.
The mechanisms by which proteins sense voltage is diverse: ion channels have a conserved, positively charged transmembrane region that moves in response to changes in membrane potential, some G-protein coupled receptors possess a specific voltage-sensing motif and some membrane pumps and transporters use the ions that they transport across membranes to sense membrane voltage.
References
Bezanilla F. How membrane proteins sense voltage. Nat Rev Mol Cell Biol. 2008 Apr;9(4):323-32. PMID: 18354422