General Chemistry/Filling Electron Shells
Filling Electron Shells 
When an atom or ion receives electrons into its orbitals, the orbitals and shells fill up in a particular manner.
Aufbau principle 
You may consider an atom as being "built up" from a naked nucleus by gradually adding to it one electron after another, until all the electrons it will hold have been added. Much as one fills up a container with liquid from the bottom up, the orbitals of an atom are filled from the lowest energy orbitals to the highest energy orbitals.
Orbitals with the lowest principal quantum number () have the lowest energy and will fill up first. Within a shell, there may be several orbitals with the same principal quantum number. In that case, more specific rules must be applied. For example, the three p orbitals of a given shell all occur at the same energy level. So, how are they filled up? ans: all the three p orbitals have same energy so while filling the p orbitals we can fill any one of the Px, Py or Pz first. it is a convention that we chose to fill Px first ,then Py and then Pz for our simplicity. Hence you can opt for filling these three orbitals from right to left also.
Hund's Rule 
According to Hund's rule, orbitals of the same energy are each filled with one electron before filling any with a second. Also, these first electrons have the same spin.
This rule is sometimes called the "bus seating rule". As people load onto a bus, each person takes his own seat, sitting alone. Only after all the seats have been filled will people start doubling up.
Pauli Exclusion principle 
No two electrons can have all four quantum numbers the same. What this translates to in terms of our picture of orbitals is that each orbital can only hold two electrons, one "spin up" (+½) and one "spin down" (-½).
Orbital Order 
1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p, 8s.
Although this looks confusing, there is an easy way to remember.
Understanding the above rules and diagrams will allow you to determine the electron configuration of almost any atom or ion.
How to Write the Electron Configuration of an Atom 
Electron-configuration notation is relatively straightforward. Calcium, for example, would be 1s22s22p63s23p64s2. This could be abbreviated by using the preceding noble gas (the elements found all the way on the right of the periodic table) as [Ar]4s2, where Ar is argon. Noble gasses have very stable configurations, and are extremely reluctant to lose electrons.
Rule of Stability 
A subshell is particularly stable if it is half full or full. Given two configurations, the atom would "choose" the more stable one.
Example: In the following configuration, Cu: [Ar]4s23d9, copper's d shell is just one away from stability, and therefore, one electron from the s shell jumps into the d shell: [Ar]4s13d10. This way, the d shell is full, and is therefore stable, and the s shell is half full, and is also stable.
Another example: Chromium has a configuration of [Ar]4s13d5, although you would expect to see four d electrons instead of five. This is because an s electron has jumped into the d orbital, giving the atom two half-full shells—much more stable than a d orbital with only four electrons.
The stability rule applies to atoms in the same group as chromium and copper.
If one of these atoms has been ionized, that is, it loses an electron, it will come from the s orbital rather than the d orbital. For instance, the configuration of Cu+ is [Ar]4s03d10. If more electrons are removed, they will come from the d orbital.
Magnetism is a well-known effect. Chances are, you have magnets on your refrigerator. As you already know, only certain elements are magnetic. Electron configurations help to explain why.
Diamagnetism is actually a very weak repulsion to magnetic fields. All elements have diamagnestism to some degree. It occurs when there are pair electrons.
Paramagnetism is an attraction to external magnetic fields. It is also very weak. It occurs whenever there is an unpaired electron in an orbital.
Ferromagnetism is the permanent magnetism that we encounter in our daily lives. It only occurs with three elements: iron (Fe), nickel (Ni), and cobalt (Co).