How can a spacecraft leave orbit?
In order to leave orbit, a spacecraft needs to be going fast enough to break free of gravity. A huge push is needed to do that. Either that push was given to a ship as it was launched or it is given to a ship already in orbit. To push a ship that is already in orbit farther from the planet, thrusters should be fired at the highest point in the orbit. Generally, a ship will go into higher and higher orbits until it intersects with its destination. Spacecraft can go from planet to planet that way. Even if a ship from the Earth leaves Earth orbit, it is still in orbit around the Sun. Huge amounts of energy are needed to push a ship fast enough to break free from the Sun’s gravitational pull. To leave orbit and travel towards the body it is orbiting, a ship only needs to slow down (by retroburning or aerobraking) and wait for gravity to pull the ship in.