newton 3rd law of motion which says action and reaction are equal and opposite. just like if you fill up a ballon with air it losses mommentum it loses the greater it flies around.
so rocket achieve thrust and moves when you exert a huge amount of mass at high speed
and also its able to move or fly to space due to rocket staging