Pain is a complex experience that involves physical, emotional, and cognitive aspects. This review focuses specifically on the physiological processes underlying pain perception, with a particular emphasis on the various types of sensory neurons involved in transmitting pain signals to the central nervous system. Recent advances in techniques like optogenetics and chemogenetics have allowed researchers to selectively activate or inactivate specific neuronal circuits, offering a promising avenue for developing more effective pain management strategies. The article delves into the molecular targets of different types of sensory fibers such as channels, for example, TRPV1 in C-peptidergic fiber, TRPA1 in C-non-peptidergic receptors expressed differentially as MOR and DOR, and transcription factors, and their colocalization with the vesicular transporter of glutamate, which enable researchers to identify specific subtypes of neurons within the pain pathway and allows for selective transfection and expression of opsins to modulate their activity.