I think there are several things to be said on staying pure in a relationship. First, I like what Julie Boudreaux said about not being alone with a man. I think part of that has to do with setting boundaries early, like before you are even in a relationship. Determine what your boundaries are, before you even need to implement them. Maybe that means only group dates, or not being home alone together, or not going to certain types of places, or whatever. It looks different for every person. I believe God will honor that thoughtful approach of sitting down to list out boundaries and really praying about what those are for you.
I would go with what Julie and Jennifer say. Staying pure before marriage is tough, and those are the key ways to keep anything from happening! I personally can say that setting boundaries worked for me! I set boundaries before I married, and obeyed them. I trusted God and looked to him for every need or concern, and He delivered His promises! 🙂