The electronic structures of atoms
Relating orbital filling to the Periodic Table

The first period
Hydrogen has its only electron in the 1s orbital - 1s1, and at helium the first level is completely full - 1s2.
The second period
Now we need to start filling the second level, and hence start the second period. Lithium's electron goes into the 2s orbital because that has a lower energy than the 2p orbitals. Lithium has an electronic structure of 1s22s1. Beryllium adds a second electron to this same level - 1s22s2.
Now the 2p levels start to fill. These levels all have the same energy, and so the electrons go in singly at first.
B 1s22s22px1
C 1s22s22px12py1
N 1s22s22px12py12pz
The next electrons to go in will have to pair up with those already there.
O 1s22s22px22py12pz1
F 1s22s22px22py22pz1
Ne 1s22s22px22py22pz2
You can see that it is going to get progressively tedious to write the full electronic structures of atoms as the number of electrons increases. There are two ways around this, and you must be familiar with both.
Shortcut 1: All the various p electrons can be lumped together. For example, fluorine could be written as 1s22s22p5, and neon as 1s22s22p6.
This is what is normally done if the electrons are in an inner layer. If the electrons are in the bonding level (those on the outside of the atom), they are sometimes written in shorthand, sometimes in full. Don't worry about this. Be prepared to meet either version, but if you are asked for the electronic structure of something in an exam, write it out in full showing all the px, py and pz orbitals in the outer level separately.
For example, although we haven't yet met the electronic structure of chlorine, you could write it as 1s22s22p63s23px23py23pz1.
Notice that the 2p electrons are all lumped together whereas the 3p ones are shown in full. The logic is that the 3p electrons will be involved in bonding because they are on the outside of the atom, whereas the 2p electrons are buried deep in the atom and aren't really of any interest.
Shortcut 2: You can lump all the inner electrons together using, for example, the symbol [Ne]. In this context, [Ne] means the electronic structure of neon - in other words: 1s22s22px22py22pz2 You wouldn't do this with helium because it takes longer to write [He] than it does 1s2.
On this basis the structure of chlorine would be written [Ne]3s23px23py23pz1.
The third period
At neon, all the second level orbitals are full, and so after this we have to start the third period with sodium. The pattern of filling is now exactly the same as in the previous period, except that everything is now happening at the 3-level.
For example:
short version
Mg 1s22s22p63s2 [Ne]3s2
S 1s22s22p63s23px23py13pz1 [Ne]3s23px23py13pz1
Ar 1s22s22p63s23px23py23pz2 [Ne]3s23px23py23pz2