Valency is a measure of an element's ability to combine with other elements and form chemical compounds. It is determined by the number of electrons that an atom can gain, lose, or share in order to achieve a stable electron configuration. The valency of an element is typically indicated by the number of electrons it needs to gain or lose to achieve a full outer shell of electrons.