A magnetic field is a region around a magnet or a current-carrying conductor where a magnetic force is experienced. This force can act on other magnets or magnetic materials, as well as on moving charges.
Magnetic field lines are used to visualize the direction and strength of a magnetic field. They are imaginary lines that show the direction a small north pole would take if placed in the field. The density of the lines indicates the strength of the magnetic field, with more lines per unit area indicating a stronger field.
The strength of a magnetic field can be measured in units of tesla (T) or gauss (G). One tesla is equal to 10,000 gauss. The strength of a magnetic field decreases with distance from the source, following an inverse square law similar to the behavior of electric fields.
Magnetic fields are created by moving charges, such as currents in wires, and by the intrinsic magnetic moments of elementary particles associated with their spin. Additionally, permanent magnets create their own magnetic fields due to the alignment of the magnetic domains within the material.
Magnetic fields have numerous practical applications, including in electric motors, generators, magnetic resonance imaging (MRI) machines, magnetic levitation trains, and magnetic storage devices such as hard drives and magnetic tapes.