I've been with my girlfriend for over 2 years, with more than 3/4 of that being long-distance. The issues webby mentioned are pretty key:
1, Communication is critical. I try and make time to talk over phone or Skype at least 5 days a week if I can, usually for no less than an hour if possible.
2. Visits. As often as your life allows, preferably with a somewhat regular schedule. However, what's even more key is to always have one scheduled. I try and ensure that the next visit's date is set no more than a day or two after the last visit, preferably before I even leave to go see her.
3 Trust--this is huge, basically, if you have worries about your commitment or hers...well, heed them. If you can't trust the other person, you don't want to be in a long-distance relationship with them.
Another big thing is to find something to do together--Portal 2 has been great for this with my GF and I in the past week, but this doesn't have to mean doing things absolutely at the same time--read the same books, or follow things that might be up the alley of the other person, not you. It'll help ensure your lives have something going on you can both talk about. "What did you think of X?" followed by discussion is much more fulfilling than just a stream of "So this is what I've been up to, how about you?"
All relationships represent investment--this is even more true for long-distance relationships. For one to work, you need to make time for it and you need to be sure you're interested in making that investment for the person you're entering it with. It can work (as I said, I've been in mine for over 2 years), but it takes two people committed not just to each other but to the health of the relationship.