Theory of Magnetism
If a magnetic piece of steel rod is cut into smaller pieces, each piece is a magnet with a N or a S pole.
Therefore a magnet can be said to be made of lots of "tiny" magnets all lined up with their N poles pointing in the same direction. At the ends, the "free" poles of the "tiny" magnets repel each other and fan out so the poles of the magnet are round the ends.
In an unmagnetised bar the "tiny" magnets point in all directions - the N pole of one neutralized by S pole of another. Their magnetic effects cancel out and there are no "free poles near the ends.
This theory explains:
This can be done by:
ContentsHistory of magnetism, What is a magnet