What a great question! First let me tell you a little bit about your Nervous System.
Your body is made up by trillions of cells that do various things, and the cells associated with the Nervous System are called neurons. The human Nervous System can be divided into two components: The Central Nervous System, made up of the Brain (which is inside your head) and the Spinal Cord (inside your spinal column which is your backbone); and the Peripheral Nervous System, composed of various nerves, like Cranial nerves (around your head), and peripheral nerves (that go all around your body). Nerves are bundles of neuronal fibres that transmit signals, which are electric impulses. These signals are transmitted from the periphery, for example, the toe, to the Spinal Cord and the Brain by sensory neurons. Signals can also go the other way around, from the Central Nervous System to the various parts of your body, through motor neurons.
Now, all over your body you have sensors that detect different types of information. Your eyes, for instance, detect light. All over your skin you have sensors that detect pressure. Your ears detect sound. Also, all over your body you have sensors that detect pain. All these different sensors are neurons that specialise in the detection of different types of information. When these specialised sensors detect something, they generate an electric impulse that is transmitted through a neuronal fibre, bundled in a nerve, all the way to Central Nervous System. This happens extremely fast. Then, in the Central Nervous System, you have specialised groups of different neurons to process the information and generate the appropriate responses. Those responses are then transmitted (as electric impulses) down motor neurons to the muscles. An example of this is what happens when you hurt yourself: for instance when you accidentally prick yourself in the hand, your immediate response is to lift your hand away from the thing that pricked you. This happens because your skin creates a pain signal that travels through sensory nerves to the Central Nervous System, first to the Spinal Cord and then the Brain. Once there, the neurons create a response that travels down motor neurons that communicate with muscles, driving your hand to move away.
The amazing thing about your Nervous System is that it performs these types of operations all the time for all types of information. And besides collecting information from the world around you, it also collects information from what is going on inside of you, like your muscle activity, your breathing, your gut, etc. And it can process them all at the same time! And in doing so, it helps you to respond and communicate with the world around you in the most effective way possible.