Elements in the periodic table may be divided into Metals, non-metals, and metalloids.
Metals are the elements that react by losing electrons to form stable positively charged ions known as cations. Examples are group 1, 2, and 3 elements together with transition elements.
Non-metals are those elements that react by gaining electrons to form stable negatively charged ions called anions. Examples include oxygen, carbon, sulfur, etc.
Metalloids, on the other hand, are elements that have both metallic and non-metallic properties.
Metalloids occur between metals and non-metals in the periodic table. Examples include Boron and silicon among others.