I'm going out with this girl but she lives almost 300 miles away, how can I make sure it works out?
Communication is truly great advice, but I'd also add that it can be helpful to normalize any physical time together. From my experience, it can be tempting to treat every second almost like an emotional vacation. "We can't fight, we only have two more days together!" "I can't go to work, we only have a couple days left."
For a relationship to work in the long term, you have to be comfortable with each other as real, flawed (but perfectly wonderful and lovable) human beings. Dealing with jobs and time management and everyday frustrations are a great way to find out each other's quirks and how each of you deals with the messiness of life. Don't blow off your normal activity for your significant other. Invite them into your normal life, and see how those normal lives mesh.
I've had 2 long distance relationships, neither worked because of the time of life I was in, not the distance.
I think the key is treating it like a normal relationship but make sure that you make time for each other.
Also be honest with each other, don't pretend to be happy when you're not, just be as you would if they were with you in person