The formation of magnetic force
Like poles repulse each other and unlike poles attract each other. Magnetic force is formed under the magnetic field.
The concept of magnetic force
In a magnetic field, its magnetic force has different magnitude and direction on an object. For example, when two magnets are put closer, the larger the magnitude of magnetic force between them and vice versa. The formation of either repulsive or attractive force depends on the poles facing each other.
When one side of a seesaw is forced down, the repulsive force in between becomes larger. As forces between the magnets are changing, the seesaw continues to move up and down.