Rocket works on the principle of conservation of linear momentum.
Conservation of linear momentum :
Momentum is defined as the motion contained in a body. In a closed system, if no force acts on the system, the linear momentum of the system remains constant.
Working of Rocket :
First, consider the rocket is at rest in space. So, initially there is no momentum. As the engine ignites, the exhaust gases go in one direction and to keep the momentum conserved, the rocket will move in other direction. After that, the rocket will get a "push" to go in forward direction because of the momentum change of the gases, This "push" is referred to as Thurst, which is defined as the force exerted on the rocket.