I try to explain electronic configuration as simple as possible..
electronic configuration would tell us the composition of energy levels of the electrons inside the atom/ion.
An electron shell can hold up to 2n^2 number of electrons (where n is the shell number). Application of this equation would tell you that the first shell holds a max of 2e, and max of 8e for the 2nd shell.
Using the above idea, the electronic configuration of oxygen (proton number
is 2.6. It means the first shell contains 2e and 2nd shell contains 6e. Consequently, oxygen is in group 6. Elements in the same group contain the same number of valence electrons. Valence electrons are the electrons in the outermost electron shell.
Next, we are going to split the electron shell into sub-shells, namely the s, p, d & f (in order of increasing energy level). The number of sub shell would correspond to the shell number. Eg. the first shell would only contain 1 sub-shell, ie. 1s. The 2nd shell would contain 2 sub-shells, ie. 2s and 2p. The 3rd sub-shell would contain 3s, 3p and 3d. An interesting feature to note is that 3d energy level is lower than that 4s. This results in the interesting properties in the transition metals (the column of elements between group 2 and 3 in e periodic table).
The sub-shell energy levels are ranked in this order:
1s < 2s < 2p < 3s < 3p < 4s < 3d < 4p .. (this is less than complete. refer to a general chemistry textbook for the full order)
Each sub-shell would contain a specific number of orbitals. Each orbital can hold up to max of 2e (with reference to Pauli's Exclusion Principle). s subshell contains 1 orbital, p subshell contains 3 orbitals, d subshell contains 5 orbitals, f subshell contains 7 orbitals. I hope u can see the pattern, that 1,3,5,7 are actually increasing odd numbers with reference to increasing energy level of s,p,d to f.
Electrons are filled into their subshell according to Aufbau's Princple, that lower energy level is being filled first. Also note that electrons are filled to minimise inter-orbital electronic repulsion too.
Eg. if I were to have 4 electrons to fill the 3 2p-orbitals, I would end up with 1 full orbital and 2 half-filled orbitals, and not 2 full orbitals. Imagine that if u have two electrons in the same orbital (aka same confinement into 3D space), their electronic repulsion would be maximised, because they are so near to each other. Electronic configuration are such that the atoms/ions would be at the lowest energy level at their ground state.
Now, back to the example of Oxygen (2.6), the electronic configuration can be re-written as 1s
2 2s
2 2p
4. 1s
2 would mean there are 2 electrons in the s energy level of the first shell. 2s
2 would mean there are 2 electrons in the s energy level of the 2nd shell. 2p
4 would mean there are 4 electrons in the p energy level of the 2nd shell. Notice that when u sum the number of electrons in the same shell, they correspond to first form of electronic configuration (2.6)
I hope reading this will increase your understanding on electronic configuration.