Couple of questions.
Why does the earth keep moving?
The engine of a rocket applies a continual force to push the rocket along. When the engine stops what will happen?
I think the rocket will stop acceleration
You need to be aware of the concept of inertia. Inertia is the tendency of a body to stay at rest or in linear motion, unless influenced by some other force.
If it was not for the gravity pull of the sun, the earth would fly off into space.
If the rocket is in the atmosphere or within the gravity pull of the earth, either the friction of the atmosphere or the pull of the earth's gravity will cause it to change course. These are some "other forces."
Acceleration is an increase in speed, which will stop once the engine stops. However, if there are no other forces acting on it, it will continue to travel at the same speed in a straight line.
I hope this helps. Thanks for asking.