There are many examples of magnetic forces at work in nature. One of the simplest is two magnets being placed near each other. If two sides with similar charges are placed near one another, they repel each other. If dissimilar sides are placed near each other, they attract each other.
The Encyclopedia Britannica defines a magnetic force as the interaction between electrically charged particles that results in either attraction or repulsion. Besides the aforementioned force among magnets, the magnetic force is seen in many everyday situations, including the action in electric motors. The most constant example of a magnetic force is the one exerted by the Earth. This field is responsible for many essential functions, including the functioning of compasses and protection from the sun's harmful rays.
In physics, magnetism is considered a long-range force. It is one of two primary long-range forces, along with gravity. The difference between long-range forces and regular forces is that long-range forces must always be considered, regardless of physical distance. Unlike other forces that may act on an object, gravity and magnetism are never equal to zero. Other forces, such as tension or friction, must be in contact with an object to have an effect.