Before we look at electromagnets let's recap magnetic fields.
Magnets create magnetic fields. These cannot be seen.
They fill the space around a magnet where the magnetic forces work, where they can attract or repel magnetic materials.
Although we cannot see magnetic fields, we can detect them using iron filings. The tiny pieces of iron line up in a magnetic field.
It would be difficult to draw the results from the sort of experiment seen in the photograph, so we draw simple magnetic field lines instead.
In the diagram, note that:
The magnetic field is strongest at the poles, where the field lines are most concentrated.