The oxidation number of an atom is the charge that atom would have if the compound was composed of ions.
An oxidation number indicates the loss or gain of electron(s) by an atom while forming a molecule. It can have positive (electron loss), negative (electron gain) and zero value.
Example: H2O has H in +1 oxidation state and Oxygen in −2 Oxidation state.