Final answer:
When two magnets are brought close together, like poles repel each other, while opposite poles attract each other.
Step-by-step explanation:
When two magnets are brought close together, the magnetic field lines are perturbed. If two north poles or two south poles are brought together, they will repel each other, and the magnetic field lines will bend away from each other. On the other hand, if opposite poles of two magnets are brought together, they will attract each other, and the magnetic field lines will become denser between the poles.