Formal Charge = [no. of valence electrons on atom] – [no. of non-bonded electrons + number of bonds]
Formal charges do not indicate actual charges of atoms in the molecule. It is more of a property of a structural formula than that of the species the formula represents.
In comparison, oxidation number/oxidation state shows the total number of electrons which have been removed from an element (a positive oxidation state) or added to an element (a negative oxidation state) to get to its present state.