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.