Here's a more accurate explanation of what happens:
* Electrostatic Attraction: The positively charged nucleus of one atom is attracted to the negatively charged electrons of a nearby atom. This attraction is what holds atoms together in chemical bonds.
* Electron Sharing (Covalent Bonds): In some cases, atoms share their electrons to achieve a stable configuration. This sharing creates a strong bond between the atoms, like in water (H2O) where the hydrogen atoms share electrons with the oxygen atom.
* Electron Transfer (Ionic Bonds): In other cases, one atom may completely transfer an electron to another atom. This creates ions (atoms with a positive or negative charge) that are attracted to each other, forming an ionic bond. This is like in table salt (NaCl) where sodium loses an electron to chlorine.
Important Note: While the nucleus attracts electrons, it doesn't actually "grab" or "take" electrons from other atoms. The interactions between atoms are much more complex and involve a balance of forces, including the repulsion between the nuclei and the electrons within each atom.