Depending upon to which sub-shell the new coming electron (differentiating electron) enters, the elements are classified as ‘s’ ‘p’, ‘d’ and ‘f’ block elements.
Sodium is a s-block element as it gets its differentiating electron into 3s subshell.
Oxygen is a p-block element as it gets its differentiating electron into 2p subshell.
Iron is a d-block element as it gets its differentiating electron into 4d subshell.
Cerium is a f-block element as it gets its differentiating electron into 7f subshell.