A magnet can exert a force on another nearby magnet. Magnets have two poles:
Magnetic force is strongest near a 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.