The Quantum numbers are nothing but the term that is used to address the position of an electron in an atom.There are 4 quantum numbers.
It is the basic q.no which is used to represent ORBITS or ENERGY LEVELS.eg:l,m,n,o
It describes the presence of ORBITALS in every orbits.eg:s,p,d,f
It represents the presence of ORIENTATION in every orbitals.eg:px,py,pz
It represents the two direction of spin by an electron.
It is based on HUND'S RULE of maximum multiplicity.
The rule states that while allowing electrons into each orbitals of p.If you have to fill 3 electrons in p orbitals you can fill each one at px,py and pz.If you have to fill the fourth electron then you should put it onto px orbital which already have an electron in it.So it must be compulsary that for you to fill atleast one at each.
The diagram will make you know the configuration better way.