Atoms are the smallest particles that still retain the chemical properties of an element. They are made up of subatomic particles called neutrons, electrons and protons. Ions are charged atoms or groups of atoms. Ions can be positively or negatively charged. Positively charged ions are called cations. Negatively charged ions are called anions.
Atoms make up elements based on the number of protons they have. Ionic charges are assigned based on the number of electrons an ion has.
Elements are fundamental substances, made of atoms, that cannot be chemically changed or broken down further. Atoms consist of a core nucleus and orbital electrons. The nucleus is made up of protons and neutrons. Protons are small particles that have a slightly positive charge. Neutrons are about the same size as protons. They have no charge. Electrons are very small, even smaller than protons and neutrons. Electrons have a slightly negative charge. The number of protons in the nucleus of an atom determines which element the atom makes up. The number of electrons, particularly valence electrons, orbiting the nucleus determines how reactive the atom is.
Electrons orbit an atom's nucleus because they are attracted to the positively charged protons. They don't stick to the nucleus because they are repelled by the negative charges of the other electrons. Electrons tend to orbit in layers called shells. Each shell is "filled" when it contains an octet of eight electrons. The outermost shell holds the valence electrons. The valence electrons determine how reactive an element is. Atoms of different elements have different numbers of electrons. The number of valence electrons an atom has can be determined using the periodic table. There are eights columns on the periodic table, and elements are organized into one of the eight columns. The number of valence electrons in an element corresponds with its column, ranging from one to eight. The noble gases in column eight have a full octet of valence electrons and are not very reactive.
The noble gases are very stable because they have a full outer shell. Most elements, with the exception of the heavy metals, the lanthanides and the actinides, follow the octet rule. The octet rule states that elements tend to undergo reactions that result in a full valence shell. Atoms with full outer shells are not very reactive because they are energetically stable. Atoms exchange electrons to increase stability.
Ions are formed when atoms transfer electrons. All atoms "want" to have a full octet of electrons in their outermost shells. Atoms with seven valence electrons will want to gain one electron to have a total of eight. Gaining one is easier than losing seven. Atoms with one valence electron want to lose an electron to drop down to a full shell. Losing one is easier than gaining seven. Electrons have a negative charge, so atoms that gain an electron to complete their octet are also gaining a negative charge and becoming anions. Atoms that lose an electron are losing a negative charge and becoming cations. Atoms that lose or gain multiple electrons are losing or gaining multiple charges.