how space a flights work
If a flight is planned carefully, a spacecraft can use the gravity of planets and moons to do a swingby or be pulled into orbit. Much of the aiming of spacecraft is done at or near launch, when the huge launch vehicle that puts it into space can push it onto a course that will take it to the right place.