Your body parts are connected to your brain with nerves.
Those nerves let you control your muscles, sense heat, touch, and pain.
These nerves also give you a vague sense of where those body parts are.
You also have a mental picture of how your body is shaped and what moves are possible, so when combined with the information from your nerves gives you a pretty good idea of where you body is positioned.
Latest Answers