Let's get biblical.
Having sexual intercourse before marriage is NOT a sin. Only if you do so with a person, other than the one you marry, is it a Sin. If you know you are going to marry this girl, and think it's okay to have intercourse, think about what's stopping you from marriage. If you had a ring and the money and the permission, what's stopping you from getting married? If you answered, well, I guess I'm really not ready to marry her yet, I need to know her a little better or talk through some more things, then you should NOT have sexual intercourse, for if you do you are putting the Lord, Your God, to the test.
Oral,anal or hand sex, sexually touching, etc before marriage is NOT a sin. In Scripture it says, "It is good to not touch another person (who is not your future wife, or husband) sexually." It's the same logic as sexual intercourse. It is only holy to sexually touch the woman you are going to marry. Find out if your ready to marry her, and pray. If you see it as a risk, then it should not be done.
Masturbation is NOT a sin. Sinful thoughts often accompany masturbation though. If you are not having sexual relations, then masturbation must be completely non-sexual as well to avoid sinful lust, sexual fantasies. If what caused you to want to masturbate is not sexual, and if you think non-sexually while masturbating, go for it. Teenagers will probably have an easier time with this, with their high hormones. If you are in a sexual relationship, and masturbate to only things you have done in that relationship, that is not a sin as well. Just be careful, because too much masturbation can cause you to want pleasure, more than give it and cause sinful lust and desire to be manifested in the mind.
Conclusion: God calls us to be wise, thus, what should be taught is, "It would be wise to abstain from all sexual thoughts and actions with all people until you are married." If you innately are trying to search for loop-holes, then think about your true motives.