Sports drinks always boast about their abundance of electrolytes and how they are essential to consume when working out, but they never explain why.
"Electrolyte" is simply a scientific word for a salt ion. If a salt is called an electrolyte then it means that it has an electric charge, whether it be positive or negative. Electrolytes are necessary in our bodies at the cellular level to maintain voltages across cell membranes and to carry electrical impulses across cells such as muscle contractions and nerve impulses. The main electrolytes in question here are sodium and potassium.
The kidneys are responsible for maintaining the proper concentration of electrolytes within your body. For example, if there is an excess of sodium in the body the kidneys will remove it through the urine.
When you exercise, electrolytes are lost through sweat. Because of their importance to one's health, they must be replaced. This is why many sports drinks like Gatorade add electrolytes in their bottles.