A relay is a electromechanical device that can be used to switch eg. a high voltage/current with a low voltage/current.
It consists of a coil and the switching part. When current flows through the coil, the magnetic field produced can move the switching contact, eg from off to on, or vice versa.
They come in many colors, sizes, types and ratings.
Useful to turn on/off a load, even 115VAC/230VAC.
A solenoid is a electromechanical device that has a movable part that can either
- push or
The kinds we consider don't have much power (just a few Newtons usually), but their primary use is to lock/unlock something, like an engine start switch. After the engine is started, that starter switch is supposed to move back to its 'Norm' position. This can be accomplished with an solenoid.