The Gate-Control Theory of pain perception was developed by Melzack and Wall's who indicated that the spinal cord contains a type of neurological "gate" which opens and closes to either allow or block pain signals to travel to the brain. This gate does not actually open and close like the gate on a fence, but simply allows pain signals to pass onto the brain when they are traveling on the small nerve fibers, and does not allow pain signals to pass when they are traveling on the larger fibers. In this case, there doesn't really need to be anything physical to produce pain; you only need to have the small nerve fibers send signals onto the brain to feel pain. This is why, for example, some people who are missing a limb often indicate that they can feel the missing limb, have pain in the missing limb, etc. Pretty amazing, eh?