The rocket is propelled upward by the surface of the pad, while gravity attempts to pull it downward.
Rocket engines operate on action and reaction, propelling rockets forward solely by expelling exhaust in the opposite direction at incredible speeds, and can thus operate in the vacuum of space.
As the rocket engines ignite, the thrust from the rocket unbalances the forces and causes the rocket to ascend.
In fact, rockets perform better in space than in the atmosphere.
Multistage rockets are capable of achieving escape velocity from Earth and thus have an unlimited maximum altitude.