What is the difference between valency and oxidation state?

Valency is the number of bonds an atom can form with other atoms, reflecting its ability to combine. Oxidation state, on the other hand, indicates the number of electrons an atom has gained or lost when forming a compound, or its charge in a molecule. For example, in NaCl\text{NaCl}, sodium has a valency of 1 and an oxidation state of +1, while chlorine has a valency of 1 and an oxidation state of -1.