Permanent magnets have a magnetic field of lines around them flowing from the north pole of the magnet to the south pole of the magnet.
A current-carrying conductor generates the magnetic field of lines around it. The determine the direction of the magnetic field, keep the direction of the right-hand thumb in the direction of the current flowing through the conductor, and the direction in which the fingers close to form a fist is the direction of the magnetic field generated. This is also known as the right-hand thumb rule.
Final Answer:
Hence, two methods of producing magnetic fields are permanent magnets and current-carrying conductors.