Our cells, mainly our muscles use certain chemicals together with water to make sure that the electrical charges occurring naturally in our bodies are working properly. Sodium, potassium, chloride, potassium, calcium and magnesium are minerals which dissolve in water and form electrically charged electrolytes particles called "ions". Maintaining the correct concentrations of these ions in and outside cells in the body is essential for transmitting the electrolyte impulses along nerves and for muscle support.
Salt (sodium chloride or NaCl) is one of the electrolytes that we all know well. When salt is dissolved in water, the ions become separated. They are involved in fluid (water) balance in our body, if the balance is off, your nerves and muscles can suffer.
Magnesium and potassium are also important in fluid balance of your muscles. If your balance of electrolytes is wrong, you can get muscle cramps because the impulses are not firing correctly and muscles contract in resulting in spasms.
When the levels of sodium are too high, the body can retain more water, which also raises the blood pressure (hypertension) as the increased water makes the heart work harder.
Sodium (usually from salt) basically has to be kept out of cells. It's mostly in the blood stream, on its way to the kidneys. You only need roughly 1 gram of salt daily, but our diets commonly contain 8-10 grams, and sometimes even more because salt has been put into so many manufactured foods.
Potassium is the main electrolyte in the fluid inside your cells, with less potassium than sodium in the fluids outside your cells).
When you become dehydrated, the electrolytes in your blood system that are outside the cells become more concentrated. This is detected by thirst receptors in your brain and you are then thirsty.
At the same time a hormone ('antidiuretic hormone' or ADH) is released, which reduces the water loss in urine being produced by the kidneys, to begin to correct the dehydration. ADH often causes headaches.
Finding the right balance of water and electrolytes in your diet is essential.