Yes KCl is an ionic compound. Water can behave in that way as it's a polar covalent structure. The 2H atoms in water are slightly positive and the O atom is slightly negative because oxygen has 2 lone pairs of electrons as it has electron attracting properties. However, they are not ions, just slightly charged atoms. Water is not ionic because the bonding occurs with shared pairs of electrons between two non-metals.
I assume by NH3Cl you actually mean ammonium chloride, NH4Cl - this has a dative covalent bond, a covalent bond, and an ionic bond. The reason this occurs between two "non-metals" is because the covalent bonds exist between the N-H atoms, 3 covalent and 1 dative bond. This forms the ammonium ion, NH4+. This compound is an ion in it's own right, and so can ionically bond to a Cl- ion. It is the NH4+ as a whole and the Cl- which have an ionic bond, whereas the bonding within NH4+ is covalent and dative.
Magnesium forms ionic compounds, salts such as MgCl2 for example, meaning when it is in aqueous solution with the solvent being water for example, the polar nature of water (slightly positive H atoms and slightly negative O atom) means the Mg2+ ion in MgCl2 will be attracted to the slightly negative O atom in H2O, and the 2Cl- ions in MgCl2 will be attracted to the slightly positive H atoms in H2O. This "pulls apart" the ionic compound, MgCl2. Therefore, magnesium in aqueous solution would exist as an ion, not a molecule or elementally - thus you write it as Mg2+(aq). In its standard state Magnesium is written as Mg(s).