The two forces that hold atoms together in a molecule are the electric force and the nuclear force. These forces bind the three parts of an atom, which include electrons, neutrons and protons.
Electrons, which have a negative charge, orbit the nucleus in an atom. Protons, which have a positive charge, are inside the nucleus. Because electrons and protons have opposite charges, the electric force causes them to pull toward one another. An atom usually contains the same number of electrons and protons. Neutrons have no electric charge, and the nuclear force binds the neutrons and protons together inside the nucleus.