For the answer to the question above, well, the pin is a stimulus and your skin is the receptor of the pain. Your skin sends an electric impulse which travels in a sensory neuron. The electrical impulse travels over synapses by going through a chemical reaction. It travels to the central nervous system as a motor neuron, then it acts as an effector which your body responds. The response is by quickly lifting up your foot.