It is defined as the combining power or the capacity of an atom of an element with other atoms or elements.
It is also defined as the number of electrons an atom of a particular element can accept or donate to combine chemically with other atoms of other elements in order to form different chemical compounds or molecules in order to attain a stable noble gas configuration.
Valency of an element is always a whole number.
Valency of an element can be determined by knowing its electronic configuration.
For Example:
The atomic number of Sodium is 11. It's electronic configuration is 2,8,1.
There is only 1 electron present in the valence shell of Sodium. So, it will donate its 1 electron in order to attain a stable noble configuration.