Magnetism is a broad term used to describe the physical phenomena caused by moving charges, or current. Similar to how static charges can create electric fields, both moving charges and permanent magnets can create magnetic fields, or B-fields. B-fields are mathematically vectors.
A permanent magnet is a magnet which maintains its magnetic properties at the absence of a current. In other words, the B-field from a permanent magnet is not induced but rather caused by the permanent internal structure of the magnet's material which is created during the magnet's formation. Iron, nickel, and cobalt are very common metals used to make permanent magnets and are more broadly known as ferrous metals.
The atoms which make up a ferrous material have some unpaired electrons which are constantly spinning (this is why you may here that electrons have a spin direction in other physics or chemistry courses). Recall that B-fields are created by moving charge. So, the spinning unpaired electrons create their own little B-fields surrounding them. For normal ferrous materials that are not permanently magnetized, the spin of each atom is rather random and does not create a dominating B-field.
When manufacturing permanent magnets, an external B-field is applied to the ferrous material while it is first heated then cooled to set the spin direction of all the free electrons to align, creating a south and north pole.
B-fields and E-fields have many similarities. First of all, both of them create repulsive and attractive forces. A north and south pole of two magnets will attract, while two north or two south poles will repel one another. This ability to create forces gives B-fields the benefit of having the ability to apply torque. Consider a magnetic bar placed in the starting orientation shown below within a B-field. The repulsion and attraction forces between the B-field source and the magnet apply a torque to the bar, causing it to rotate and orient itself to be inline with the B-field.