I will guess that you are in an introductory chem. class. Dr. W gave you a very detailed answer, but probably more than you need. You are probably not studying organic chemistry or you would already have had much of the basic info. My bet is that you only want the basic info.
===== At the beginning level .. there are ionic compounds and molecular compounds .. Binary ionic compounds consist of a metal and a nonmetal, like NaCl .. sodium chloride .. no prefixes are used in the names to indicate the number of atoms .. CaF2 is just calcium fluoride. But Binary molecular compounds are the ones that use the prefixes you are talking about. ... CO one oxygen so the name is carbon monoxide
CO2 has 2 oxygen so it is carbon dioxide
the first element does NOY use the mono prefix to indicate 1 atom.
.. but if there is more tan 1 atom then the first element also uses a prefix
.. Cl2O3 .. both Cl and O are nonmetals so this is not ionic, but is molecular .. 2 = di, and 3 = tri so the name is dichlorine trioxide <<< notice the last element in all these BINARY compounds gets the -ide suffix.
== That is it. Later you will learn more rules for naming other kinds of compounds ... LEARN THEM AS SOON AS THEY ARE GIVEN. Trying to learn all the rules at one time is just too much to do.
some names do not follow these rules .. hydrogen peroxide is an older, common name and does not follow these rules .. Like english spelling rules, there are exceptions and those must just be memorized,