Basically, space probes don't have a lot of fuel, but need to reach large speeds, so they use the sling shot effect to gain velocity. they approach the planet at a particular angle, so they can take advantage of some of the attraction forces of the planets gravity. then they kinda swing past the planet, and although relative to the planet the space probes velocity has decreased, it actually increases, due to the attractive forces of the planet being converted into kinetic energy