I don't know much science but was curious about it.
So, what I've seen in movies is that there are lot of objects in the space and many other space items (made of rocks, moving stars etc.). So when the vehicle is traveling to Mars, why doesn't it collide with those objects? How does it remains safe?
Secondly, how does it know Mars is this way? Does it calculate and correct its path itself from time to time so its trajectory is accurate or do NASA computers and scientists have control of it like a remote control car, or do they just define a trajectory in the beginning, define a target (Mars) and it keeps traveling on it (if yes, how can it be so accurate)?