A magnet can exert a force on another nearby magnet and magnetic materials such as iron. Magnets have two poles:
The magnetic force is strongest near the magnet's poles.
Two magnets will either attract or repel each other in the following way:
Magnetic forces are non-contact forces – this means that magnets affect each other without touching. It is an example of a force acting at a distance.