A solenoid is a long cylinder with a length of uniform wire wrapped around it in the form of a helix. When an electric current is sent through the wire, it creates a magnetic field inside the cylinder, turning it into an electromagnet. The magnetic field inside the cylinder is stable and becomes more uniform towards the center of the solenoid. Therefore, an object affected by magnetism is drawn towards the center of the solenoid.
The value of the magnetic field within the solenoid is determined by the equation B = u0nI. The magnetic field (B) depends upon the permeability of free space (u0), the number of turns in the coil of wire (n) and the current of electricity flowing through the wire (I). Theoretically, the relationship between the magnetic field and the other components in the equation was exact if the solenoid were infinitely long, or if the coil of wire was at a length to diameter ratio of five or greater.
Other ways of increasing the value of the magnetic field include increasing the current of electricity flowing through the wire or the number of turns in the coil of wire. Increasing the current of electricity flowing though the wire requires that the voltage across to be increased, causing the heat generated by the resistance of the wire to greater. Increasing the number of turns in the coil of wire requires the wire to be a smaller diameter, causing increases to the resistance to the electrical current and the heat generated by the process.