Time and space are connected. The flow of time changes depending on a variety of factors. The most significant factors are gravitational forces and relative speed compared to others. WAIT! Don't leave. I'll give examples.
For every foot you climb from the surface of the Earth time moves faster by 1 billionth of a second. This is a rough approximation but close enough for our purposes.
GPS satellites use a unique orbit between the communication satellites in geosynchronous orbit and the weather satellites, space stations, and space shuttles in a low, 90 minute orbit. They're high enough that they're moving 45 millionths of a second faster per day than the people in the cars they're tracking.
But they're also moving faster than those of us on the ground. In their particular orbit they slow relative to us by 7 millionths of a second per day.
So all in all the GPS satellite is moving 38 millionths of a second faster than you or I. That's not much, but light can travel 7 miles in those 38 millionths of a second. So if the internal clocks aren't constantly being updated they'd become off from the correct position by 7 miles a day.
Einstein predicted this but I don't think he ever saw the experimental data to back this up.
Are you with me so far? If not stop and chew on that for a bit. The next step is to expand that real world example into examples you'd only see in science fiction.
You can calculate the relative time difference between an Earthbound observer and a person in a ship flying near light speed with a simple and familiar equation.
That's the square of the time of the observer on Earth (a) minus the square of the distance traveled (b) equals the square of how long it takes the traveler to get there.
The classic example is when you take a pair of newborn twins, put one (Carl) in an absurdly fast rocket and fire it into space while the other (Al) stays behind. Al ages 25 years while Carl roars through space to his destination 24 light years away. Then Carl turns around and comes back. Another 25 years passes for Al before Carl shows up. Carl steps from the ship only 14 years old. Al, who stayed here, just turned 50.
25 years2 - 7 years2 = 24 light years2
This is one of the problems with most science fiction. When the Enterprise goes to warp they very likely will never see their families again. By the time they get back from Vulcan (a.k.a. 40 Eridani - ~16 light years away) even at the speed of light (warp 1) everyone they know is now 32 years older while they've barely aged at all.
All good and befuddled now? Please ask questions. I'll answer the best I can.