There are 2 types of bonding in chemicals; ionic bonding and covalent bonding. Both of these aim to fill the outer shells of the atoms. You can also have bonds between molecules called intramolecular bonds.
Ionic bonds:
Ionic bonding is where the electrons involved in the bond are fully transferred from one species to another in order to fill the outer shell of all the atoms involved. This creates some ions which are positively charged, and some which are negatively charged, and their is an electrostatic attraction between the opposite charges.
For example, in table salt, NaCl, the sodium fully transfers one if it's electrons to the chlorine to make Na+ and Cl- which attract each other to form NaCl.
Covalent bonds:
Covalent bonds are when the species involved share some of their electrons with each other so that both species fill their outer shells.
For example, in hydrogen, each hydrogen atom on it's own only has 1 electron in it's outer shell. To fill it, they need 2, so they each share their single electron with the other, so that both hydrogen atoms have access to both electrons, therefore having full outer shells and making H2.