A field is a mathematical function that assigns a quantity to each point in space. Scalar fields assign scalar quantities to each point in space; vector fields assign vectors to each point in space. In physics, vector fields are used to represent the behaviors of forces. For example, the behavior of gravitational forces can be represented by assigning vectors to points in space, where each vector represents the magnitude and direction of the gravitational force that would be exerted on an object located at that point.
Electric and magnetic forces can also be represented by vector fields. Every charged object is surrounded by an electric field. The strength and direction of the electric field at each point is defined as the force that would be exerted on a particle with 1 coulomb of positive charge if the particle were located at that point (whether or not such a particle is actually located there).
The behaviors of forces can also be usefully represented using field lines. Field lines are the lines (or curves) through space that follow the directions of the force vectors at each point. In other words, they are the paths that would be traced by objects that move in small increments, following the direction of the force vector at one point to a nearby point (without going the full length of the vector), then following the direction of the second point’s vector for a short distance to a third point, and so on. Field lines do not show the magnitude (strength) of the forces at each point, but they make it easy to visualize how the directions of the vectors change over a region of space.
A magnetic field is another kind of vector field associated with electric charges. The direction of the magnetic force vectors at each point correspond to the direction in which the north pole of a magnet would be pushed if it were located at that point. Magnetic fields are produced whenever a charged object moves. When a charged object moves in a straight line, the magnetic field lines form concentric circles perpendicular to the object’s direction of travel. For example, when an electric current moves along a straight wire, magnetic field lines form circles around the wire. (An electric current is a flow of charged particles, usually electrons.)
Physicists represent the direction of an electric current as opposite the direction of electron flow. For example, if the electrons are moving to the right, the electric current is regarded as flowing to the left.
Now imagine what happens if we take that wire and bend it into a loop so that the current moves in a circle. Magnetic field lines pass through the loop as they encircle each segment of the wire. All of these magnetic field lines flow through the loop in the same direction. The result of this arrangement is a magnetic field with two magnetic poles: the outflowing side of the loop is called the north pole, and the inflowing side is called the south pole.
Something similar happens at the microscopic level, as electrons orbit the nucleus of an atom. As each electron spins around the nucleus, it produces a (very weak) magnetic field with north and south poles. In some atoms, the electrons spin in opposite directions, so their magnetic fields cancel each other out. However, the magnetic fields produced by an atom’s spinning electrons don’t always cancel out, and many atoms do act as miniature magnets. If enough of these atoms are aligned in the same direction, their magnetic fields work together to produce a much stronger magnetic field that can be felt at the macroscopic scale. Magnets are simply materials that have their atoms aligned in this way.
Some minerals, like magnetite, have their atoms naturally aligned. Magnets can also be artificially produced by placing certain metals (e.g. iron) into a magnetic field, causing the atoms to align (temporarily or permanently, depending on the process) with that magnetic field. For example, a simple temporary magnet can be made by wrapping wire around a nail, then running an electric current through the wire. The circling electric charges in the wire produce a weak magnetic field, and the iron atoms in the nail align with that field so that their own magnetic fields work together to produce a much stronger field. Temporary magnets like this are called electromagnets. Materials that have their atoms permanently aligned are called permanent magnets.
If you break a permanent magnet in half, each half will have its own north and south poles. Repeat this process as often as you like; you’ll never get a north pole or a south pole by itself. Since each atom has both a north and a south magnetic pole, it is impossible to get a north or south pole alone. In other words, magnetic “monopoles” don’t exist in nature. And you can’t create a magnetic monopole in the laboratory either. Magnetic monopoles just don’t exist.