First, be able to understand how to classify electrons with quantum numbers (e.g., n, l , ml, and ms).
Next, learn the order in which electrons fill orbitals. S subshells take 2 electrons, p take 6, d 10, and f 14. G, and h subshells are there, but you shouldn't worry about them. Look up where on the periodic table is the s block, p block, d block, and f block.
Know that it subshells fill in increasing n+l values.
The general order is 1s, 2s, 2p, 3s, 3p, 4s, 3d, etc. Notice how 4s comes before 3d because of n + l. If n + l is the same for two different subshells, you choose the one with the lower n value.
The ms quantum number is seen in the orbitals. In orbital diagrams, one electron is signified by an arrow pointing up, one down. They have opposite spins. Look up orbital diagrams.
This is a really broad question, you shouldn't ask them on a forum. However, here you go. Practice will make it perfect.