There are many kinds of bonds.
There are ionic bonds. Probably the simplest to understand. Where you have a positively charged atom next to a negatively charged atom. I should be saying "ion" instead of atom, but I think we all get it. It's not necessarily just two charged atoms. In, say, a crystal of salt, you've got lots of positively charged sodium atoms and negatively charged atoms all arrayed in a big network. So you can have two sodium ions near each other if you've also got chlorine ions nearby.
There's covalent bonding. Electrons like to pair up into orbitals, with one electron spin up, and the other spin down. So if you've got an atom with an electron sitting all lonesome by itself in an orbital, it can hook up with the electron from another atom to form a molecular orbital. Like hydrogen, for instance.) Halogen atoms stick together the same way. So does oxygen. Sulfur. Nitrogen. Carbon. And others.
There's metallic bonding, which is what gold does. In metals, the electrons are very loose, so they just sort of float around with the positive metal nuclei in place. Gold doesn't form molecules, since you need ordered, repeated structure to have a molecule. But you can have things called gold "clusters." Which are just several gold atoms sticking together in tiny little chunks. That's probably how most elements stay together.
There are numerous intramolecular forces.
Atoms have a property called electronegativity. That's how closely they pull on electrons. Metals, as you might deduce, have poor electronegativity. Metals like sodium have very, very poort electronegativity, part of the reason why it so commonly has a positive charge. If you've got two atoms with different electronegativity, you can induce a partial charge. One atom will have a partial negative charge, the other has a partial positive charge. And you can get molecules to stick to each other quite strongly with these partial positive charges. It's confusingly called "hydrogen bonding" and it gives water its strong surface tension, for example.
(in that image, the little greek letter delta stands for partial charge)
There are van der waals forces. Electrons can move around atoms and molecules. So while electrons are on one side of a molecule, there's a partial positive charge on the other. This can cause atoms of one type to stick to atoms of the same type on another molecule. All the little hydrogen atoms in fat molecules stick to each other this way, giving butter some solidity.
If an atom can't let go of any electrons (it has high electronegativity) and all its electrons are paired up, it won't stick to other atoms. Nobel gases are like this, and that's why they're gasses.