In nature there are no 100% ionic compounds. Each chemical compounds has a certain percentage of ionic character in its bonds and the remaining percentage as covalent bonds. The only compounds that are accepted as being 100% covalent are the chemical combinations that happen between two similar atoms, like for example the C-C bond existent in diamond, or the O-O bond in O2. Usually if atoms are different in the compound it will present a certain percentage of ionicity in its bond, the highest the difference between electronegativity of elements the highest the percentage of existent ionic bonds. Thus usually the compounds like NaCl (first element from group IA, last element from group VIIA) are regarded as ideal ionic compounds, whereas compounds like GaAs, or InSb (first element from group IIIA, last element from group VA) are regarded as covalent compounds (although they present about 10-15% ionicity in their bonds). For metaloids, like Ge-Ge and Si-Si bonds, because they contain atoms of the same type the bond is almost 100% covalent.
Ionic compounds are the one which gain or loase electrons.While covalent share electrons. We can tell if the molecule is ionic or covalent by seeing the formula of it. For eg. H2O is a covalent bond as it has two hydrogen atoms sharing electrons with an oxygen atom. For ionic compounds the atoms loase or gain electrons.
for eg. Fe[II]O. Fe gives two electrons to Oxygen and both complete their octet.
Most of the Covalent bonds actually have a non-metal and most of the ionic compound have a metal.