Atoms contain atomic magnetic moment and atoms in a small region interact strongly with each other to create a small area where the field acts parallel. These are called domains which contain net magnetic moment in some particular direction.
Usually there are lots of randomly oriented domains, meaning having different directions, but when some field interacts with them (say, an external field) then they would all face to the direction of the external field, and now a net magnetic moment that is responsible for the magnetism of the magnet is created.
The reason I mentioned all this is to make clear that these domains inside a magnet must align in the same direction so as to act as a magnet. So I am saying that, as they face the same direction, the magnetic field created by each domains will add up and a net effect is created.