What is the difference between electromagnet and solenoid?
An electromagnet is a made coil associated with a ferromagnetic core. This way, the strength of the magnet is controlled by the input current.
A solenoid is a simple shape used in magnetostatics or magnetics. Like the plane or the sphere in electrostatics, the 1-turn coil in magnetostatics, its study is interesting because the calculus of the magnetic field inside is doable. Moreover, the solenoid produces a pretty uniform field inside, if you are neglecting edge effects.
So you could say that the solenoid is interesting because of the uniform magnetic flux density inside, and the electromagnet because of the non uniform magnetic flux density outside (an electromagnet may be done with a solenoid).
A solenoid is a cylindrical coil of wire whose diameter is small compared to its length. When an electric current flows through the wire the solenoid generates a magnetic field similar to that of a bar magnet.
An electromagnet is a solenoid wound around a central iron core. The magnetic field generated by the coil of wire magnetizes the core, increasing the total magnetic field.
An inductor is a coil of wire wound around a central core (iron or air), and is used to provide resistance to a DC current flowing through the wire.
A solenoid is an electromagnet but an electromagnet needn't necessarily be a solenoid.
A wire carrying electric current is an electromagnet. In fact, the very first electromagnet was a horseshoe shaped. So a suitable definition of electromagnet would be, anything which produces a magnetic field around itself when a current passes through it is called an electromagnet.
But most of the times, the electromagnets that we prepare consist of large number of coils with a core inside the coil (usually a solenoid). The only function of adding a core and increasing the number of turns is to increase the strength of the magnetic field.
Solenoid can be defined as a coil wound into a tightly packed into a helix. Both electromagnets as well as solenoids can have magnetic cores. In fact, most simple inductors are basically a solenoid with a magnetic core to enhance its inductance.
To summarize, an electromagnet is anything which has the ability to produce a magnetic field using electricity whereas a solenoid is a tightly wound coil, you can save that solenoid is a type of electromagnet.