Neurons in the peripheral nervous system receive painful stimuli through mechanoreceptors and nociceptors, which activate sensory receptor neurons. These afferent sensory neurons carry nerve impulses from the stimuli to the central nervous system. Efferent motor neurons then transmit neural impulses from the central nervous system to muscles, triggering movement in response to painful stimuli.