How do atoms bond to form molecules?

One way is by one atom donation one or more electrons to another atom. This is an example of an ionic bond and the electron(s) are actually transferred from one atom to another. Another way is by sharing electrons. Shared electrons form a covalent bond.