A rocket expels mass (exhaust gases) at high velocity. To conserve the total momentum of the system, the rocket moves in the opposite direction. This is an application of the law of conservation of momentum.