Hi Mark P,
I think the answer to your question "What is sex?" is that sex is penetration. In the Bible, it is penetration that makes a woman no longer a virgin:
Deuteronomy 22:13-18, NIV wrote:13 If a man takes a wife and, after lying with her, dislikes her 14 and slanders her and gives her a bad name, saying, "I married this woman, but when I approached her, I did not find proof of her virginity," 15 then the girl's father and mother shall bring proof that she was a virgin to the town elders at the gate. 16 The girl's father will say to the elders, "I gave my daughter in marriage to this man, but he dislikes her. 17 Now he has slandered her and said, 'I did not find your daughter to be a virgin.' But here is the proof of my daughter's virginity." Then her parents shall display the cloth before the elders of the town, 18 and the elders shall take the man and punish him.
The cloth mentioned would be the cloth used to collect blood on the wedding night. If the woman had previously engaged in sexual activity with penetration, then there would not be blood on the cloth. If she had previously engaged in sexual activity, but without penetration, she would still be considered a virgin by this test. That is why I say that penetration==sex. (Of course, we know now that not all virgins bleed the first time they have sex, so this is not an accurate test of virginity, but I think it does illustrate what is considered sex.)
However, if your question is really "What kinds of sexual activity are okay with God before I get married?" then I would give you a different answer:
1 Corinthians 6:18, NIV wrote:Flee from sexual immorality.
I think this verse suggests that, rather than try to engage in as much sexual activity as possible without actually having sexual intercourse (penetration), Christians should try to stay as far away from (flee) sex as possible before they get married.
However, for an unbeliever (non-Christian), refraining from sexual activity before marriage will NOT help you to be seen as a good person in the eyes of God:
Romans 3:10-12, NIV wrote:10As it is written:
"There is no one righteous, not even one;
11there is no one who understands,
no one who seeks God.
12All have turned away,
they have together become worthless;
there is no one who does good,
not even one."
It's a good thing God justifies wicked people like me:
Romans 4:5, NIV wrote:However, to the man who does not work but trusts God who justifies the wicked, his faith is credited as righteousness.
I'm glad I've trusted God to justify me!
I hope this helps to answer your questions Mark!