Answer:
3. They are formed by ions that have the opposite charges.
Step-by-step explanation:
Ionic compounds are formed when two oppositely charged ions react. Ionic bonds are formed when an atom has tendency to loose its valence electron/electrons and another atom has tendency to accept them. All the atoms on this earth want to be stable but they can be stable only when they have stable electronic configuration. Some atoms like noble gases have stable electronic configuration already so they don't need to react with any other atom of any other element but others do not have stable electronic configuration and in order to achieve this stable electronic configuration they need to react with atoms of other elements through various kind of bonds/interactions like ionic bond.
An example of ionic bond is interaction between magnesium ion (Mg2+) and chloride (Cl-) to form magnesium chloride (MgCl2).
Apart from ionic bonds there are other type of interactions too like covalent bonds, hydrogen bonds, hydrophobic interactions etc.