The MESSENGER spacecraft is closing fast on its close encounter with Mercury tomorrow (the Planetary Society has a detailed preview here, flyby simulation video here). This will be the first close approach to Mercury since Mariner 10 in 1974-75, and it will be very close - only about 200 kilometers from the surface! This is the first of three flyby encounters in 2008-2009, designed both for imaging/science and for trajectory modifications that will help MESSENGER to match Mercury's orbit and allow Mercury orbit insertion in March 2011. The 2008 passes should finally give us imagery of Mercury's entire surface (Mariner 10 was only able to photograph about half of the planet on its three flyby encounters). The planned one-year orbital phase will allow much more detailed study of this relatively unknown planet.
Launched in August 2004, MESSENGER's journey to Mercury has taken a rather indirect path, looking something like a pinball in a pinball machine in in the animated GIF above (linked from the Planetary Society web site). MESSENGER got trajectory help from several gravitational-assistance passes (Earth flyby in 2005, two Venus flyby's in 2006 and 2007, and the upcoming Mercury passes in 2008 and 2009 - here's a great diagram of the stages of the trajectory). Since Mercury is close to the sun, you might wonder why all this bouncing around is necessary, since it's pretty much "downhill" from Earth to sun-hugging Mercury, gravitationally speaking. While I don't know the specific constraints on the MESSENGER trajectory design, there are always complex trade-offs among payload (the mass available for instruments and spacecraft structures), propellant mass and usage, and timing. If you can wait longer to get there and use gravitational assistance from planets, you can carry a larger payload while needing less propellant to arrive precisely at your target at the right time and with the right velocity to do what you need to do.
This whole orbital mechanics business has interested me since high school. Aside from library books, I'm sure that the many "NASA Facts" and other documents that I got by writing to NASA played a big part. That was the Apollo era, so I was reading about free-return trajectories and orbital rendezvous and the like at a young age. At one point I thought that this might even be my career, since I was so interested in space and computers, but I took a path not unlike MESSENGER (with a music-assisted change in direction and university) and ended up in optics software instead.
Nowadays at places like JPL, interplanetary trajectory design is incredibly sophisticated. Simulation, optimization, and visualization software make it possible to meet all sorts of constraints and requirements and to perform and pre-visualize all sorts of "what ifs." If you would like to play around with this sort of stuff yourself, there is the great combination of Orbiter and IMFD (Interplanetary MFD by Jarmo Nikkanen, a wonderful planning tool that runs inside Orbiter itself, now up to version 5.1d). Gravity Simulator 2.0 is another great and free tool for playing with orbits and trajectories. You can even use JPL Horizons data to get real spacecraft data to use in your own simulations (see my earlier tutorial post on this).
Speaking of tutorials, I just found one for IMFD 5.0 that I had not seen before. It's a 20 minute narrated video tutorial by Robert Denny, and it's really cool (he has done earlier text/picture tutorials on IMFD which are still available, though they are based on an earlier version of IMFD). While this "simple tutorial" is very well done and clear, you should note a few points. One is that he assumes some basic familiarity with Orbiter and with orbital mechanics terminology. Another is that he is only showing the "MFD" instrument windows, not the full Orbiter screen. Orbiter has cockpit views, external views, and full 3D graphics, but for this tutorial, you are essentially "flying on instruments" and don't need to see that other stuff, though you would see the outside view if you were running this in Orbiter. Third is that Denny has chosen to transfer from Europa to Callisto, two moons of Jupiter. Jupiter is like a mini (but still huge!) solar system, so it's quicker and simpler in some ways to learn to do orbital transfers between moons there than between widely separated planets orbiting the sun. The same methods would apply to flying from (say) Earth orbit to Mars orbit. Even if you don't understand everything, you can see from this tutorial what a powerful tool IMFD can be, and it goes much farther than what is shown here. There are other (non-video) IMFD tutorials on Jarmo's site.