What is a difference between a solenoid and an electromagnet?
The main difference between a solenoid and an electromagnet is the way they function or utilized and the way they are constructed or build.
An electromagnet is a copper coiled or wound around a solid piece of metallic core that when energized becomes a magnet.
Solenoid is a wire coiled in helical manner carrying current and have magnetic field produced within in it.While a solenoid is very similar in construction except the core is hollow. A hollow core where a metallic pin or plunger is positioned. The metallic plunger is mechanically coupled or linked to a mechanism that will open or close a valve, a contact point, etc.
Basically a solenoid is an electromagnet driven mechanism that will convert an electrical energy into a mechanical form
And now if you keep a metal along the axis of solenoid it will be magnetised and is called an electromagnet. As soon as current is switched off most of the magnetism would be lost. But there are some metals with high retentivity that retain magnetic properties for a long time.