The Lex Talonis (an eye for an eye,) is the well known teaching.
The Torah's first mention of the phrase "an eye for an eye, a tooth for a tooth, a hand for a hand, a foot for a foot" appears in Ex 21:22–27. The Talmud, based upon a critical interpretation of the original Hebrew text, explains that this biblical concept entails monetary compensation in tort cases.
One element of this interpretation notes that "an eye for an eye" understood literally would be inapplicable to blind or eyeless offenders. Since the Torah requires that penalties be universally applicable, the phrase cannot be interpreted literally. The same interpretation applies to this phrase as it appears in Leviticus 24:18–20. Personal retribution is explicitly forbidden by the Torah (Lv 19:18), such reciprocal justice being strictly reserved for the social magistrate (usually in the form of regional courts).
The Oral Law explains, based upon the biblical verses, that the Bible mandates a sophisticated five-part monetary form of compensation, consisting of payment for "Damages, Pain, Medical Expenses, Incapacitation, and Mental Anguish" — which underlies many modern legal codes. Some rabbinic literature explains, moreover, that the expression, "An eye for an eye, etc." suggests that the perpetrator deserves to lose his own eye, but that biblical law treats him leniently. − Paraphrased from the Union of Orthodox Congregations