As the rocket moves up, it consumes fuel and thus thrust is provided to the rocket. As the fuel is burnt, the mass of the rocket reduces. The fuel burnt has momentum in the direction opposite to that of the rocket. Thus, the exhaust gases provide the rocket the necessary momentum to move forward.