Magnetic field
A magnetic field is a vector field that describes the magnetic influence of electrical currents and magnetized materials. In everyday life, the effects of magnetic fields are often seen in permanent magnets, which pull on magnetic materials (such as iron) and attract or repel other magnets. Magnetic fields surround and are created by magnetized material and by moving electric charges (electric currents) such as those used in electromagnets. Magnetic fields exert forces on nearby moving electrical charges and torques on nearby magnets. In addition, a magnetic field that varies with location exerts a force on magnetic materials. Both the strength and direction of a magnetic field varies with location. As such, it is an example of a vector field.
Solenoid
In physics, the term refers to a coil whose length is substantially greater than its diameter, often wrapped around a metallic core, which produces a uniform magnetic field in a volume of space (where some experiment might be carried out) when an electric current is passed through it. A solenoid is a type of electromagnet whose purpose is to generate a controlled magnetic field. If the purpose of the solenoid is instead to impede changes in the electric current, a solenoid can be more specifically classified as an inductor rather than an electromagnet. Not all electromagnets and inductors are solenoids; for example, the first electromagnet, invented in 1824, had a horseshoe rather than a cylindrical solenoid shape.