What happens once the space shuttle goes to space?

When a shuttle reaches outer space it can turn off its thrusters because the law of inertia states that an object in motion can stay at motion until a force acts upon it. And it can just fly without wasting gas/fuel.