A magnet can exert a force on another nearby magnet. 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.