The force between two magnets is called magnetic force. This force can either attract or repel the magnets from one another, depending on their orientation.
Magnets have two poles: north and south. When opposite poles (north and south) are brought together, they attract each other. Conversely, when like poles (north and north or south and south) are brought close, they repel each other. This phenomenon arises from the magnetic fields created by the flowing electrons within the magnets, which interact with each other to create the magnetic force.
Understanding magnetic force is essential in various applications, from simple magnetic toys to complex devices like electric motors and generators, where controlling magnetic interactions plays a crucial role in their operation.