We usually only notice lust in its grossest form, but like every other effect that's blatant enough for us to see, it has causes that are themselves effects of more and more subtle causes. You can disarm this process at any point with mindfulness, but the trick is knowing what you're looking for, and having the energy to see through it.
As was said, little glances here and there, flirtatious talk, a split-second daydream, these all can snowball.
I have a real problem with flirting and getting carried away by lust. It used to undermine friendships or at least make them have an uncomfortable undercurrent of sexual tension all the time. It's more under control now, but still a work in process. I've also found viewing all people as your family members helps a lot, as well as fostering warmheartedness towards them

Also, depending on how strong your lust is, you may fall on your face over and over and over in your attempt. Lust has a way of flaring up unexpectedly and sweeping you away. Only a few moments may pass between chanting om mani padme hung and pleasuring yourself

All the more reason to be mindful of your warning signs/thoughts or triggers, and coolly see them for what they are.
I remember a story of a person suffering greatly from lust asking either the Buddha or a master for advice, and he said to notice the cool and warm feelings in the body. There may be a strong electric feeling in your loins that is really largely a mental preoccupation. Imagining that warmth spreading back out through the body helps cool the fire.
So yeah, just be mindful, and especially be kind with yourself when you fail. Guilt didn't do a single thing for me for 10 years. Now, gentle patience and persistent mindfulness has been bearing modest fruit.
Good luck!!
Please take the above post with a grain of salt.