Rockets work by pushing exhaust gases out the back at high speed. By Newton's third law, the gases push the rocket forward. It doesn't need anything to push against - it pushes against its own exhaust.
This is why rockets work in space where there's nothing to push against. They carry their own "push."