A solenoid is an electromagnetic switching device, used to switch on and off heavy duty circuits such as starting motors or glow plug circuits.
They are similar to relays in construction, operation and use. The main difference is that in relays, we use an electromagnet to close a set of contact points, but in a solenoid we use an electromagnet to move a soft ironarmature into a circuit so that it completes an electrical pathway between two terminals.
Below, we can see a solenoid controlling a glow plug circuit: