Hohmann or least energy orbits. With the usual "kick and coast" rockets, the Hohmann or least energy orbits are the paths that you would take to get to another planet using the least amount of energy. (Hohmann was a German scientist who published this idea in 1925.) The basic idea is that you want to get just to the distance of the second body from the Sun, and no farther (or closer for interior planet), as you need energy to change your speed so as to move away from the Sun (or towards Sun for interior planet!)
Since the Hohmann orbit is just an ellipse with known aphelion and perihelion, you can easily find the semimajor axis and from that the period of the Hohmann orbit- it obviously takes 1/2 the period to get from the inital body to the other body. For instance, the Hohmann orbit to Mars (assuming Mars has a circular orbit) has a semimajor axis of about 1.25 AU, so its period (by Keplers III) is about 1.4 years. To get to Mars on this orbit would require 0.7 years about 8.5 months. (In reality, the orbit of Mars is significantly non-circular, so you would launch at a time so that the rocket would get to Mars when Mars was closest to sun- a trip of about 7 months).
Now, once you get to the other body, you will not be going at its speed, so you will have to use energy to change your speed to match the destination body.
The speeds are given in miles/second, not meters/second (sorry!). If you are going from Earth to Mars, you would start out with the Earth's orbital speed (18.5 miles/sec) and have to add speed to get to the Hohmann orbit (you need 20.4 miles/second at the perihelion of the Hohmann orbit). Of course, if you were really leaving from the surface of the Earth, or even Earth-orbit, you would need additional energy to get away from the Earth's gravitational pull.
Conic section curves. The intersection of a plane with a cone will generate curves called conic sections. Gravitational orbits result in paths which are always a conic section curve- ellipses (circle is a special ellipse) for bound orbits, parabola for the dividing line between bound and unbound orbits, and hyperbolas for unbound orbits.
The shape of the orbit (ellipse, parabola or hyperbola) is also related to the total orbital energy (TOE). All ellipses have TOE less than zero. All parabolic orbits have TOE equal to zero. All hypebolic orbits have TOE greater than zero.
Galileo spacecraft path. The Galileo spacecraft was sent to Jupiter by first stealing some energy from the Venus-Sun system, then stealing some energy from the Earth-Sun system (twice!).
Voyager2 speed. The Voyager 2 spacecraft stole energy from Jupiter-Sun, Saturn-Sun, and Uranus-Sun systems! Note the "spike" in Voyager 2 speed at each planet. The craft sped up at it fell towards the planet, then slowed down as it passed by the planet (and had to "coast uphill" away from the planet), but, due to the stolen energy, the speed at which the craft left the vicinity of each planet was greater than the speed as it approached the planet. Voyager 2 is now leaving the solar system, having acheived a speed greater than the escape speed from the Sun.
Where does the "stolen" energy come from that speeds up the spacecraft? NOT from the KE of Jupiter!! In fact Jupiter ALSO SPEEDS UP in its orbit! Jupiter gets closer to Sun, so the PE of the Sun-Jupiter system gets smaller (more negative). So the energy to speed up spacecraft AND Jupiter comes from PE of Sun-Jupiter system. (Of course, the fractional change of speed of Jupiter is incredibly small, as Jupiter has a mass about 24 powers of 10 times the mass of Voyager 2!)
Comet path altered by Jupiter. In this cartoon, a comet on a parabolic orbit (with zero TOE) interacts with Jupiter to end up in an elliptical orbit (with negative TOE). Thus, the Jupiter-Sun system would GAIN the energy lost by the comet. Jupiter would move minutely away from Sun and slow down minutely in its orbit. Whether such an interaction cause the small body to gain or lose energy depends on the details of the interaction- the angle between the velocities of Jupiter and the small body, whether the body comes "in front of" or "behind" Jupiter as it orbits the Sun, etc.
Gravitational slingshot. An advanced race could accelerate spacecraft to enormous speeds by stealing energy from a binary star system- this is same physics used to speed up Voyager (and other interplanetary probes launched by the primitive Terran civilization in galaxy quadrant Z123-72), but on a much grander scale.
The best systems for such a "gravitational slingshot" would be systems where at least one component was a stellar-mass "compact object" - white dwarf, neutron star or black hole- so that the craft could get as close as possible to the center of one of the objects without crashing into it. Black hole binaries would be the ultimate objects to steal gravitational energy from!
What would happen to the binary star system after the craft "stole" energy? The stars would SPEED UP in their orbit, and would get CLOSER TOGETHER. This at first seems backwards- naively you would expect the stars to slow down as the system loses energy- but it makes perfect sense when you factor in the potential energy (PE) - the stars lose more PE when they come closer together than they gain kinetic energy (KE) when they speed up -so the total energy of the star system after the encounter is LOWER than before- as it must be, as the craft removes some energy from the star system, just like the Sun-Jupiter system had a little less energy after Voyager 2 used some energy to speed itself up.