There's a whole lot of flavors your SF can come in, ranging from "Cereberal" through "That Was Awsome!" and on down to the surprisingly popular "Suckberry." All of these, however, fall into two broad categories: Hard and Soft.
Soft doesn't really give a rat's ass about science, physics, or the real world at all. Primarily, they're interested in telling their story - which is fine, I'm not knocking it - and the world they construct has about as much in common with the real universe as Narnia does. Examples include STAR Trek, STAR Wars, STARgate, BattleSTAR Galactica, STAR Blazers, STARman, pretty much anything with "Star" in the title. Well, really, pretty much any SF you see on TV if we're honest.
Hard SF tends to try to pay as much attention to real science as possible - the distance between stars, relativity, weightlessness, - the nuts and bolts stuff that most people don't really care about, but which impose their own limitations and - in my opinion - make the story that much more interesting.
I'm not saying one is better than the other. I love Stargate (Except that crappy movie), and I find Isaac Asimov and noted pedophile Arthur C. Clarke to be amazingly boring, even though they're both hard SF, but even so, I tend to prefer a little 'science' in my 'science fiction.'
So let's say you want to write an SF story about interstellar travel, but you don't want to just make crap up as you go along. Where do you find the tools for that?
Here's two great ones:
First up is the Interstellar Database, a massive Db of tens of thousands of nearby stars. Just type in the name and it'll tell you where the star is in relation to earth, the spectral class, the approximate orbital distance an earthlike world could comfortably orbit at, and the approximate age of the star. It'll also tell you the XYZ coordinates of the star. Once you've got that, it's just a matter of geometry.
Bad at math? God knows I am, so I use a three dimentional distance calculator. While not expressly designed for astral navigation ("Astrogation"), the principle is universal: Enter the XYZ coordinates from your starting point, and the XYZ coordinates of your destination, and - zango-bango - it'll tell you the distance.
It's preferable to use the Galactic coordinates to the other ones, and the results from the calculator will be given in lightyears.
So go play with it. Even if you're not interested with these things as a writer's tool, they're a lot of fun.