For a person to lust after someone else is to commit sin. Let it be understood that lust is not just desire, but unlawful or illicit desire. Thus, it is impossible for one to lust after his or her spouse, since there is nothing sinful about those desires. Sexual desire is not intrinsically wrong. It is God-given and natural (cf. Gen. 1:28). However, it must be fulfilled in the only authorized relationship for such--marriage (cf. Heb. 13:4). For your eyes to see an attractive person doesn't automatically mean that you've lusted. However, to focus your thoughts on that individual and have illicit thoughts or fantasies is to be guilty of committing adultery in your heart.
Someone once said that you can't keep birds from flying over your head, but you certainly can prevent them from nesting in your hair; how true! In like manner, there is nothing you can do to prevent some temptations, but you can always keep them from having a resting place in your heart! It should also be noted that there is a difference between a look of lust and a look of admiration or affection. For instance, there is nothing wrong with fathers gazing admiringly upon their daughters who have grown to maturity, but they should not desire them sexually. It is possible to recognize physical beauty without lusting in one's heart.
Jesus' teaching in this passage is difficult for many, especially men. Even if a person doesn't physically commit adultery, they still stand guilty before God if they merely have the desire to commit the act. If they stare and wish they could gratify their lust, they have sinned. This is not to say that it is just as bad to lust as it is to actually commit adultery physically. There is a difference, and there are degrees (or levels) of sin (e.g., John 19:11). Truly, it is impossible for one to actively commit physical adultery without first committing the sin in his heart. Hence, the physical act includes the mental and can be shown to be a more serious transgression (cf. Matt. 19:9). Our Lord's teaching here clearly shows that one can commit a sin within the confines of his mind. God has always expected His followers to physically abstain from adultery, but to be truly righteous is to develop a mindset that doesn't even desire those things that are unlawful.
If one is able to remove lustful thoughts from his heart, the physical act of adultery will no longer be a problem. King David would not have committed adultery with Bathsheba if he hadn't seen her and lusted after her (II Sam. 11). If he hadn't committed adultery, then he wouldn't have murdered Uriah. Much evil could have been prevented had David simply turned away after spotting Bathsheba for the first time! It is easy to see how idleness and immodesty led to David's lust and unrighteous actions. If we keep busy doing what is right and dressing ourselves modestly, such will go a long way toward preventing lustful thoughts from harboring in our minds or in the minds of others!
Friends, may we endeavor to develop hearts that are pure (Matt. 5:8). May we meditate upon those things that are noble, pure, and virtuous (Phil. 4:8). May we be distinct from the world and not possess "eyes full of adultery" (II Pet. 2:14). May we, like Job, make a covenant with our eyes, and decide not to look intently upon others lustfully (Job 31:1). If we can keep adulterous thoughts out of our hearts, physical infidelity will never be a problem.