It is hyperbole, meaning that you should find ways to not sin. If you have lustful tendencies from your eyes, train your eyes to look away when there is such a temptation before you. In that sense, you are casting out your old, sinful eyes, and replacing them with new ones.
Ver. 29. Whatever is an immediate occasion of sin, however near or dear it may be, must be abandoned (Menochius), though it prove as dear to us, or as necessary as a hand, or an eye, and without delay or demur. (Haydock)
Ignatius Study Bible:
5:29 pluck it out: A figurative statement, not a literal command of self-mutilation. Jesus uses alarming images to underscore the severity of sexual sins (cf. Mt 18:7-9).; extreme measures are needed to avoid occasions of sin, the sins themselves, and the eternal punishment they lead to.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.