Without exception, each magnet has two poles, one north pole and one south pole, including electric motors. The invisible lines of the magnetic flux leave the north pole and go in direction to the south pole. Even if the flow lines are invisible, the effects of the magnetic field produced by them may eventually 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.
Dashed lines will indicate the path of magnetic flux lines. Already the lines of the field exist in and outside the magnet, forming thus, closed loops. The magnetic flux lines will exit the north pole and enter the south pole, returning to the north pole through the magnet.
By the time two magnets are approached, the magnetic flux around them may result in an interaction between them. If the magnets are approached with the opposite poles, they will attract and if they have the identical poles, they will repel. https://www.mrosupply.com/electrical/transformers/885321_t169436_acme/