Just like only certain keys can open a lock on a door, only certain stimulants can open the ion channel and access the cell. TRPM8 opens in the presence of cold temperatures and allows Na and Ca2 ions to enter the cell. This changes the electrical charge within the neuron and the information being sent from the neuron to the central nervous system, eventually leading to the perception of cold.
TRPM8 doesn’t just respond to cold temperatures, though. It also activates in the presence of menthol, a waxy, crystalline organic compound found in peppermint and other mint oils. (It responds to other “cooling agents,” too, like eucalyptol and icilin. Why, exactly, is unknown; menthol just happens to fit the cellular “lock.”)