Scientists at University College London set out to find where in the brain that difference gets erased, comparing what happens when a touch is self-produced against when the identical touch arrives from an outside source.
Using brain scans, the team found more activity in the somatosensory cortex when a touch came from outside than when a person produced it themselves. The cerebellum showed the opposite pattern, firing less during a movement that would create a touch than during one that would not.
That pattern pointed to the cerebellum as the part of the brain that predicts the exact sensory outcome of a movement a fraction of a second before it happens, then uses that prediction to dampen the resulting signal. It is the same forecasting system now thought to explain why people cannot tickle themselves, regardless of how hard they try.

Read the original study
Blakemore, Wolpert and Frith, Nature Neuroscience, 1998 · doi.org/10.1038/2870
A prediction, not a lack of nerve endings.
Source
- Blakemore, S. J., Wolpert, D. M., & Frith, C. D. (1998). Central cancellation of self-produced tickle sensation. Nature Neuroscience, 1(7), 635–40. https://doi.org/10.1038/2870