Electrolysis is the process by which ionic substances are decomposed (broken down) into simpler substances when an electric current is passed through them.
The ions must be free to move, which is possible when an ionic substance is dissolved in water or it is melted. For example, if electricity is passed through molten lead bromide, the lead bromide is broken down to form lead and bromine.
This is what happens during electrolysis:
To be an electrolyte, a substance must be able to conduct electricity. To test for conductivity, include a sample of the substance in a circuit that contains a source of direct current (eg a cell or power pack) and a bulb or an ammeter. If a current flows through the substance when it is molten or dissolved, it is an electrolyte.