Compound naming, in chemistry, is usually done with binomial nomenclature (two-part names).
Metal and Nonmetal Combination:
When naming a metal and nonmetal compound, the first part of the name is simply the name of the metal. The second part of the name is the name of the polyatomic ion that follows, or ones of the "ides." If the nonmetal is oxygen, the second part of the name is oxide. Nitrogen = nitride, sulfur = sulfide, fluorine = fluoride, and so on...
If you're working with a metal that has more than one valence, the valence should be specified as a Roman numeral after directly after the metal it corresponds to.
NaF = sodium fluoride
CrCl3 = chromium (III) chloride
AgNO3 = silver nitrate
KMnO4 = potassium permanganate
Nonmetal and Nonmetal Combination:
Combining two nonmetals is very different, so disregard the rules above, minus the part about the "ides." Above, the number of atoms per element doesn't matter when naming, but it's an essential part of naming here. The first part (element with the positive valence) of the name needs a numeric prefix if there's more than one atom, and the second part (negative valence) needs a prefix in all cases.
Here are the numbers and their prefixes:
CO = carbon monoxide
SF6 = sulfur hexafluoride
NO2 = nitrogen dioxide
P2O5 = diphosphorous pentoxide
Also see: Acid Naming.