Compound is a substance made up of atoms of two or more different elements joined by chemical bonds, which is the attractive force that holds atoms or ions together.
The type of bonds holding elements together in a compound can vary: two common types are covalent bonds and ionic bonds.
Covalent bond is a bond formed when atoms share one or more pairs of electrons, while ionic bond is a bond formed by the attraction between positively charged ions.