A solenoid consists of a wire coiled up into a spiral shape. When an electric current flows, the shape of the magnetic field is very similar to the field of a bar magnet. The field inside a solenoid is strong and uniform. The small magnetic fields caused by the current in each coil add together to make a stronger overall magnetic field.
A solenoid with an iron core is called an electromagnet. The iron core increases the solenoid’s magnetic field strength. A simple electromagnet is made by coiling wire around an iron nail.
Electromagnets are used in devices such as electric bells, and door locks that can be controlled remotely.