So if you are looking at or even thinking about a person while doing it, then according to the bible, you are committing adultery, which is a big sin.
Yet again, the context is adultery. If you are a married man and you lustfully look at or fantasize about another woman you may as well already be sleeping with her, you are betraying your wife in your heart. That's the point. Likewise, if you are a single guy lustfully looking at and lusting after another man's wife, same point applies. The context is ADULTERY. Never forget the context.
Being sexually attracted to a woman is not a sin, I'm sorry. Fantasizing about an imaginary woman and getting yourself off is not a sin my dude. Honestly I can't even find a scriptural basis for prohibition against fantasizing about a real woman as long as she isn't another man's wife, supposing you also are single, and so long as it is not done with ill intent.
Believe it or not, God designed us to want to have sex. He commanded us to be fruitful and multiply, and designed our biology to respond to this command beginning in our teenage years. Our culture hates marriage and tends to delay it until late young adulthood. It is quite frankly insane to consider it a sin for a single man or woman to pleasure themselves while they wait for their future spouse to come into their lives.
We can so easily get all wrapped up in the commandments of men, which may have an appearance of piety, but in the end are absolutely worthless. Sexual immorality involves fornication and adultery, not masturbation or wet dreams.
"If you have died with Christ to the elementary principles of the world, why, as if you were living in the world, do you submit yourself to decrees, such as, “Do not handle, do not taste, do not touch!” (which all refer to things destined to perish with use)—in accordance with the commandments and teachings of men? These are matters which have, to be sure, the appearance of wisdom in self-made religion and self-abasement and severe treatment of the body, but are of no value against fleshly indulgence."
- Colossians 2:20-23
I find it curious that we discuss and debate and indeed argue over whether or not it's okay to diddle ourselves.
I know, its hilarious isn't it? I'm just trying to drop some sanity into this thread.