The moment two magnets approach the magnetic flux around them may lead to an interaction between them and if the magnets are approached with the opposing poles, they may attract and if they have the identical poles, repel.
Each magnet has two poles, without exception, one north pole and one south pole. The invisible lines of the magnetic flux exit the north pole and go towards the south pole. Even if the flow lines are invisible, the effects of the magnetic field produced by them may become visible.
If a sheet of paper is placed on a natural magnet or even on an electromagnet, and an iron filament is poured on it, the iron filings will be arranged along the invisible lines of the stream. Motor Accessories and parts
The dashed lines will show the path of the magnetic flux lines and the field lines exist inside and outside the magnet, thus forming closed loops. The magnetic flux lines leave the north pole and enter the south pole, returning to the north pole by means of the magnet.