Electrolytes are materials that cause water to be able to conduct electricity.
Basically this means ions, because the ions create spots in the water where there is either an additional or a missing electron (“additional” or “missing” in relation to balance of electrons to protons — a molecule or particle with unbalanced electrons and protons is called an “ion”).
Salt is one. It’s an ionic bond. You’ve got a positive sodium ion and a negative chlorine ion, bonded together like magnets by the attraction of the sodium’s positive ion to the chlorine’s negative ion.
Water molecules are polar, because the two Hs are both on the same side of the O. This gives the water molecule a positively and a negative charged side. This is called a “polar” molecule. Because water is polar, it can weakly bond with ions. This allows the ionic substance like sodium chloride to break apart, with the Na- and Ca+ ions now sticking to water molecules instead of each other.
That in turn allows there to be “holes” in the water’s electron density, the same way a metal allows there to be holes. Those holes allow electricity to flow through the metal or electrolyte-infused water.
That’s all just background on what an “electrolyte” is.
The human body uses lots of different electrolytes — is basically ions — in its biological processes.
Tons of cellular processes involve using the electric potential of different ion concentrations on the two sides of the cell membrane as a source of energy to conduct work.
One of the more famous examples is nerve conduction. Between nerve firings, sodium-potassium pumps expend energy to stuff sodium and potassium ions (Na- and K+, respectively) into high, unbalanced concentrations on the inside and outside of the cell membrane of the nerve’s axon.
Those concentrations are higher than they would be if they were balanced, and therefore there is said to be “chemical potential energy” available for use. The energy is released when channels are opened where the ions can flow to equalize across the membrane.
Basically it’s like having a bunch of springs wound tight and then banded. You snip the bands and the springs spring open, releasing that energy.
In nerve conduction, this happens in a wave (ie the release of that energy in one segment causes the next segment’s channels to open). This makes a wave of energy release that travels down the axon, and that’s the mechanism by which nerves conduct signals over long distances.
Back to your question. The sodium-potassium channel system is one of many such systems the body uses these ions for. Some ions happen to be called “electrolytes” because they turn water into an electrically-conductive substance, but that specific electrical property of being able to conduct a current isn’t directly used by the body.
To answer your second question, no electrolytes aren’t interchangeable. The nerve conduction thing I described requires sodium and potassium; it doesn’t work with other ions of the same charge.
However the body has other similar processes that also use other electrolytes — calcium is the only one I can think of — and those aren’t substitutable either.
Salt is not the only electrolyte the body needs, but it does account for the vast majority of electrolyte use.
There is, however, another separate type of chemical process that’s important for life, and that’s osmosis across a semipermeable membrane. Most of the times the body “needs electrolytes” what it really needs is salt. Not for this cross membrane pumping action, but rather just to ensure there is the correct ratio of solutes to solvent in the blood.
If you don’t have enough salt in your body, then your body will release water in order to maintain this balance. This is why if you’re really sweaty (amd have hence lost a lot of salt), and then you drink fresh water (unsalty), your body will just say “nope” and pee it right back out.
If you have lost both salt and water (you can test this by tasting your skin — if it’s salty your body has been sweating out salt), you need to take in both salt and water in order to retain the water.
This is why they sell salt tablets for construction workers.
TL;DR:
- Mostly, your body needs salt as its primary electrolyte
- This means water with some salt is a better rehydrator than just fresh water
- But your body also needs trace amounts of other electrolytes, like Calcium
- This makes gatorade slightly better than salt water as rehydration, because it’s got the other electrolytes too