The current periodic table consists of 18 vertical groups that bring together elements with similar properties. In horizontal periods the elements are arranged by increasing atomic number. The elements belonging to the first two groups (block s), starting from the left, and those belonging to the last six groups (block p) are known as main or representative elements, the ones between them being called transition elements (block d). . To avoid deforming the table, the 14 elements that follow Lanthanum (Z=57) and the 14 that follow Actinium (Z=89) are separated, placing them at the bottom. These elements constitute the group f and are called internal transition elements.
As we can see in the table shown, there is a division by a staggered diagonal line that separates metals (left) from non-metals (right). Metals have common properties such as: good conductors of heat and electricity, ductile and malleable, melting points between moderate and high. Non-metals for their part are characterized by: poor conductors of heat and electricity, brittle, low melting points (many are gases at room temperature).
Elements located in the same group have similar physical and chemical properties, largely determined by their electronic configurations, especially those of their valence shell (outermost electrons). On the contrary, the elements of a period have different properties since they differ in their valence electronic configurations.
This relationship between physical or chemical properties and the valence electronic configuration can begin by observing it in noble gases. The noble gas atoms have complete valence shells: He $(1s^2)$, Ne $(2s^22p^6)$. This closed shell configuration gives them significant stability and low chemical reactivity, which is evidenced by the scarcity of chemical compounds in which noble gases participate.
The metals of groups 1 and 2 begin to fill the s orbital of a new electron shell with one or two electrons. These metals have a tendency to lose these electrons to acquire a noble gas electronic configuration. Thus Na loses an electron, becoming $Na^+$, isoelectronic with Ne. Ca loses two electrons to form $Ca^{2+}$, isoelectronic with Ar.
By contrast, groups 17 and 16 have one and two fewer electrons than the noble gas of their period, which explains their tendency to gain electrons by forming anions. Oxygen forms anions $O^{2-}$, Nitrogen $N^{3-}$, Fluorine $F^{-}$...
As for the transition elements, they fill the ns subshell and continue to place electrons in the (n-1)d. When transition element ions are formed, the ns subshell is first emptied, and some electrons may even be lost from the (n-1)d subshell. In some cases the loss of electrons seeks the formation of ions with the same noble gas electronic configuration, but it is not the general rule.
For example, Titanium forms $Ti^{2+}$ and $Ti^{4+}$ ions. To form $Ti^{2+}$ it loses two electrons from the 4s subshell, but does not acquire a noble gas configuration. To form the $Ti^{4+}$, it loses two more of the 4d sublayer, in this case acquiring an Argon configuration.