A rocket moves by throwing mass backwards. That is the whole trick. Whatever the rocket throws out (hot gas from a real rocket, a jet of water from a bottle rocket) is called the exhaust. When the rocket pushes the exhaust backwards, the exhaust pushes the rocket forwards.
This is Newton’s third law: when object A pushes on object B, object B pushes back on A with a force of equal size and opposite direction. The two forces are a pair. They act on different objects, so they do not cancel each other. The push on the exhaust makes the exhaust accelerate backwards; the push on the rocket makes the rocket accelerate forwards.