In general, if a compound contains both metals and non-metals (e.g. Na3PO4, AgCl), the compound is ionic. If the compound contains only non-metals (e.g. CO2, XeF6), the compound is covalent. You should review your chemistry text book on how to name ionic and covalent compounds.