Sodium chloride (NaCl), also known as salt, is an ionic compound composed of sodium ions (Na+) and chloride ions (Cl-). It is formed by the transfer of electrons from sodium atoms to chlorine atoms, resulting in a positively charged sodium ion and a negatively charged chloride ion. These ions are then attracted to each other by electrostatic forces, forming an ionic bond and resulting in the formation of sodium chloride.