In physics, we we solenoid to create a uniform magnetic field in a cylindrical region. The radius is small and length of cylindrical shape is long.
It is used a strong electromagnet. Usually a long thin insulated conducting wire is wound around a hollow cylindrical conductor or non-conductor. The wire strands are wound in a helix with the windings very close to each other.
To increase magnetic effect, a soft iron cylinder may be present inside the windings of a solenoid. Inside the solenoid, the magnetic field is nearly uniform.