What is the meaning of Matthew 18:8-9?

8 Wherefore if thy hand or thy foot offend thee, cut them off, and cast them from thee: it is better for thee to enter into life halt or maimed, rather than having two hands or two feet to be cast into everlasting fire. 9 And if thine eye offend thee, pluck it out, and cast it from thee: it is better for thee to enter into life with one eye, rather than having two eyes to be cast into hell fire. (Matthew 18:8-9 KJV)

William Burkitt’s Commentary

This command of Christ is not to be understood literally, as if it were our duty to maim our bodily members; but the exhortation is to cut off all occasions that may betray us into sin; and to mortify our darling and beloved lust, though as dear to us as our right eye.

Learn, 1. That sin may be avoided. It is our duty to avoid whatever leads unto it, or may be the instrument or occasion of it.

2. That the best way to be kept from the outward acts of sin, is to mortify our inward affection and love to sin. If our love and affection to sin be mortified, our bodily members may be preserved, for they will no longer be weapons of sin, but instruments of holiness.