One similarity between magnets and the atomic model is the forces of attraction involved. Magnetic domains that are aligned so that their electromagnetic orientations are in opposite directions are attracted to each other. Similarly, electrons and protons are attracted to each other because they have opposite electrostatic charges.
Another similarity lies in forces of repulsion. When magnetic domains are oriented in the same direction, they repel each other. Two like-charged particles such as two electrons or two protons also repel each other. "Opposites attract" and "likes repel" applies to both subatomic partilces and magnets.
The magnetic domains present in magnetic materials arise from electron spin and momentum within the atom. For example, iron is well known as a magnetic substance. The 3-d sublevel of an iron atom has 6 electrons, occupying five orbitals. This means that two electrons are paired and four are unpaired, occupying orbitals alone. These unpaired electrons have the same electromagnetic orientation and produce magnetic domains. Electrons don't pair up in orbitals unless there are no empty orbitals availbale at an energy level because of the repulsion between electrons already mentioned.