When an atom gains or loses an electron, it becomes an ion. Ions formed by the loss of an electron have a positive charge, and those formed by gaining an electron have a negative charge.
Positive ions are called cations, and negative ions are called anions. Cations and anions are attracted to each other. This attraction helps atoms bond together to form molecules. Ions are also repelled by other ions with the same charge. Ions are noted when writing chemical symbols by a superscript written after the letters and numbers denoting the chemical's structure. A superscript number shows exactly how many electrons have been gained or lost, and then a plus or minus sign denotes a positive or negative charge.