When ionic bonds form compounds, each atom does not have a stable octet. Instead, the atoms lose or gain electrons to achieve a stable electron configuration, resulting in opposite charges on the ions. These oppositely charged ions are then electrostatically attracted to each other, forming an ionic compound.