You probably think of your nervous system as a kind of computer network, or some kind of electrical system that passes nerve impulses around. But in reality, the miraculous journey of a signal thorough your nervous system is a story that involves cell biology, chemistry and physics. Your brain contains 30 billion neurons, and each of them is a staggering achievement.

Here are the secrets of how your nervous system passes messages with amazing speed and accuracy.

Neurons are unique-looking little cells. Like all animal cells, a neuron has a cell body, called a soma, where the DNA-carrying nucleus sits, providing directions for the cell to make various proteins. In a neuron, however, this is just the beginning of the cell structure. On one end, the soma sprouts branch-like dendrites for receiving signals, while a long –- up to a meter long –- axon stretches away in the other direction, branching out into multiple axon terminals for sending signals.

These axon terminals are often located close to the dendrites of another neuron, forming a connection known as a synapse — despite the fact that the axon terminals do not physically touch the other neuron's dendrites. Any given neuron will have about a thousand synapses with neighboring neurons, connecting the cells and allowing them to send messages from neuron to neuron. The synapses in a single human brain outnumber the stars in the Milky Way.

But if the synapses are empty space, with no direct connection between one neuron's axon terminals and another's dendrites, then how does the message travel? The cells must send chemical signals across the gap. Within each axon terminal are sacs, known as vesicles, filled with one of 50 different chemicals called neurotransmitters. Each neurotransmitter sends a different type of message to the next neuron, which recognizes the neurotransmitters with specialized receptors on the surface of the dendrites.

These receptor sites are like locks that can only be open by specific neurotransmitter keys. Once these keys have opened the lock, they drift back into the space between neurons, where they are either destroyed by enzymes or pumped back into their original neuron's axon terminal by transporters. Back inside the cell, the neurotransmitters are again either destroyed or returned to a vesicle where they can be reused. Different neurotransmitters serve different functions, and they are also recycled differently.

When the neurotransmitters fill the receptors of the receiving neuron's dendrites, they can either be excitatory (encouraging the receiver to pass the signal on), or inhibitory (preventing the receiver from continuing the message.) Any individual neuron's dendrites might receive neurotransmitter signals from one of many other neurons — and if the excitatory signal is strong enough and then inhibitory signal is not, it triggers the receiving neuron to fire, passing the message on.

Although chemicals are required to send a message from neuron to neuron, it takes a different medium to transmit that message from the receiving neuron's dendrites to its own axon terminals: electricity. When the neurotransmitters trigger the receiving neuron to fire, it sends an electrical "action potential" along its length the way that an electrical pulse flows down a metal wire. Like wires, some axons even have an insulating coating, the fatty myelin sheath, to make the signal travel faster.

So how does a clearly non-metallic human cell manage to conduct an electrical signal? The neuron has to alter its own charge relative to the outside of the cell. In order to change its charge, a neuron manipulates the charged ions on the inside and the outside of the cell membrane. When the neuron is at rest, with no signal in the pipeline, the ions are distributed so that the inside of the cell is more negatively charged than the outside, which creates an electrical potential, called the resting membrane potential, across the cell membrane. Sodium and potassium channels in the cell membrane control the flow of positively charged sodium and potassium ions into and out of the cell, maintaining that negative rest charge.

But when certain neurotransmitters have entered the receptor sites, it changes the makeup of the axon's cell membrane: In the section of the axon closest to the soma, the cell membrane becomes more permeable. This allows positive sodium ions to enter the cell and give the inside of that section of axon a positive charge relative to the outside. Although the sodium pumps work to move these positive charges out of the neuron and restore the resting state, the influx has already triggered the same behavior in the neighboring section of the cell. Gradually, this positive charge on the inside of the cell moves down the length of the axon to the axon terminals.

When the signal reaches the axon terminals, the electrical charge changes once more: instead of sodium ions, it is the positively charged calcium ions that enter the extra-permeable cell membrane. In the axon terminal, the arrival of calcium triggers the vesicles filled with neurotransmitter to drift to the cell membrane, fuse with it, and then release the appropriate neurotransmitters outside the cell. Although this process seems lengthy, an action potential moves incredibly quickly. If you had an axon the length of a football field, a fast action potential could traverse it in one second flat.

And then the next neuron in the chain has to repeat the whole process.