Atoms join together because their opposite charges attract each other primarily in ionic bonds. In ionic bonding, one atom donates an electron to another, resulting in the formation of oppositely charged ions that are attracted to each other.
The correct answer from your options is: ionic bonds and hydrogen bonds.
However, it's important to note that hydrogen bonds are a type of intermolecular force and not a true bond like ionic bonds. But since the question emphasizes attraction due to opposite charges, ionic bonds are the primary example.
If we strictly focus on bond types, the best answer considering the context of your options is ionic bonds and hydrogen bonds for the attraction aspect.