Electrolytes are substances that produce ions when dissolved in water. They can be divided into acids, bases, and salts. These solutions conduct electricity due to the mobility of the positive and negative ions, which are called cations and anions respectively. For example, in a lead-acid car battery, the electrolyte is dilute sulphuric acid, which contains negative sulphate ions (SO42-, an anion) and positive hydrogen ions (H+, a cation). 
Electrolytes may be covalent compounds that chemically react with water to produce ions (for example, acids and bases), or they may be ionic compounds that dissociate into cations and anions (for example, ionic salts), when dissolved. Nonelectrolytes are substances that do not produce ions when dissolved in water.
[[Battery|batteries always require solutions of electrolytes to operate. In most cases, these are liquids (see figure 1). However, electrolytes can also be solids, particularly in solid-state batteries (figure 2). The simplest battery consists of two electrodes, which transfer electrons and ions between each other. The electrons move through an external wire, and the ions move through the electrolyte. Fuel cells also need an electrolyte in order to operate.
To learn more about electrolytes, please check out UC Davis' chem wiki.