Ionic bonds occur when electrons are transferred from one atom to another, forming positively and negatively charged ions that attract each other. Example: NaCl (table salt).
Covalent bonds occur when electrons are shared between atoms to achieve a stable electron configuration. Example: HO (water).