Curiosity can definitely be a problem. Myself, I don’t struggle so much with desire as with plain old curiosity - which isn’t an excuse!
I find that often such thoughts pop up when I’m sitting around doing nothing, daydreaming, or sleeping in on weekend mornings (especially treacherous). After saying a quick prayer, I think the best thing to do is to immediately get up and start doing some sort of physical work, even something as simple as doing the dishes, cooking yourself dinner, or taking a nice brisk walk. What occupies your body can also take the pressure off your mind. The important thing is to do something else, and to do it at once. Don’t sit around flirting with the temptation or beating yourself up for considering it, just run in the other direction and don’t look back!
It’s also important (at least, if you’re a bit of a melancholic like me) not to fall into the trap of hating yourself for having such temptations. They can be a real torment, and sometimes we do fail, but they’re not intrinsically more shameful than other kinds of temptations we all struggle with. I feel like I’m being stretched on the rack every time I go to confess
entertaining lustful thoughts, but I know it’s good for me - perhaps God is bringing good out of that fall by giving me an opportunity to practice courage and humility!