Being able to see each other frequently definitely helps, but if you really do love the person, you can get through it without visits all the time. As with the first poster though, I imagine it gets harder when the time spans grow to years :c
It's mostly a matter of communication? make sure you're talking every day you can, and when you can't, write them letters or send them things online for when they get back. Having a webcam definitely helps too.
But yeah basically, talk! send pictures! skype! write them letters! (seriously, letters are the best) there are lots of things online you can do together, so try to think of those things.
It sucks when you don't have any idea when you'll see them next, so it's never a bad idea to talk about the possibilities :o
Having a date to look forward to, no matter how far ahead, helps a lot.
Expect that there will be bad days when it doesn't seem worth it, but those days pass and a ldr can be just as fulfilling and wonderful as a close one!!