Of the three subatomic particles, electtons, protons and neutrons, the electrons are most responsible for an element's chemical and physical properties. Electrons are lost, gained or shared when an element reacts with other elements to form compounds. The reactivity of an element and the types of compounds it forms are determined by its number of valence or outer electrons.
The Octet Rule says that atoms will gain, lose or share the number of electrons needed to achieve the same electron configuration as a noble gas. All of the noble gases except helium, the smallest, have eight outer electrons. Within each chemical family or group, which is a vertical column on the periodic table, elements have the same number of valence electrons so they behave much the same chemically. For example, the elements in Group 1 are all very reactive metals that lose one electron. The elements in Group 7A are all very reactive non-metals that gain one electron. Both of these properties occur because of the tendency for atoms to achieve a noble gas electron configuration.
The number of protons in an atom determines its identity, for example all atoms with 6 protons are carbon, but it's not very important in determining chemical properties. The number of neutrons in an atom can vary, changing the mass without affecting chemical or physical properties. Atoms of the same element with different numbers of neutrons are called isotopes. The heavier isotopes of most elements tend to undergo nuclear decay.