Early atomic theories used the idea that an atom's electron(s) followed the same rules as a mini solar system where the planets were electrons orbiting a center proton sun.
Early observations showed the electrons were moving more like a cloud surrounding the nucleus rather than an individual planet. They also have a wobbly shape. The shape of the cloud, or orbital, depended on the amount of energy, angular momentum and magnetic moment of the individual electron.
The rules the electrons follow to orient themselves around their atom are simple once the rules governing the quantum numbers are understood..
There are 4 types of orbitals.