A magnetic field is a vector field that describes the magnetic influence on moving electric charges, electric currents, and magnetic materials. It is generated by electric currents and magnetic dipoles, and is characterized by both a direction and a magnitude, which can be visualized through field lines that extend from the north to the south pole of a magnet.