Travelling from one planet to another is not at all like travelling between towns or even countries on Earth. On the surface of the Earth, everything is fixed in its place and, for all practical purposes, never moves.
Imagine how much more difficult it would be if, say, Paris was constantly changing its distance and direction from Amsterdam. Every time you made the trip, you would have to calculate whether you had enough fuel to make the journey and how long it would take in order to know where Paris would be at the time you wanted to arrive. You might even have to wait until it moved close enough to make the journey viable.
This is the situation in space; everything is in motion with reference to everything else, because everything is moving through its own orbit. Journey times are also a major factor as some spacecraft can take many months or even years to cover the distance to their destinations.
So space journeys must launch at exactly the right time in order to arrive at the point in space when their target is passing. The ‘right time’ to launch is known as the 'launch window'.
Interplanetary trajectories are usually whole or partial orbits around the Sun. When a spacecraft launches it must first fight to break free of the Earth’s gravitational field. Once it has done this, it enters interplanetary space, where the dominant force is the gravitational field of the Sun.
The spacecraft begins to follow a curving orbit, around the Sun, which is similar in many ways to the orbit of a comet. When this orbit brings it close to its target world, the spacecraft must fire a retrorocket, to slow it down, and allow itself to be captured by the gravitational field of its target. The smaller the target, the more it must slow down.
Sometimes passing a planet without firing a rocket can result in the spacecraft being speeded up. This is known as the 'slingshot' effect.
For example, Mars Express will follow a small portion of a complete orbit during its six-month journey to Mars. On the other hand, Rosetta will make a number of complete orbits around the Sun as it uses a 'slingshot' manoeuvre to guide it towards its 2014 rendezvous with comet Churyumov-Gerasimenko.
Ion engines, such as those used on ESA's Moon mission, SMART-1, can continually fire – if only with minute thrust – constantly nudging the spacecraft into a new orbit. Over time, such changes build up to make big changes to the spacecraft's interplanetary trajectory and represent an efficient way to reach certain celestial objects that conventional rockets find almost impossible; orbits around Mercury, for example.