The pin will poke your skin, and right way your skin will send something called an electric impulse. That impulse is going to travel all the way to the sensory neuron, going on and traveling to your nervous system.
Your response to stepping on a pin is to quickly move your foot away.
Hope that helps. -UF aka Nadia