Final answer:
When a sodium atom comes into close contact with a chlorine atom, the sodium atom donates its one valence electron to the chlorine atom. This transfer of electrons forms ions with opposite charges, which then form an ionic bond.
Step-by-step explanation:
A sodium atom, which is a metal, donates its one valence electron to a chlorine atom, which is a nonmetal. By transferring this electron, the sodium atom becomes a positively charged cation (Na+) and the chlorine atom becomes a negatively charged anion (Cl-). This transfer of electrons creates ions with opposite charges, which then form an ionic bond due to the attraction of these opposite charges. The resulting compound is sodium chloride (NaCl), also known as table salt.