Depending on the amount of fuel fired, the rocket will get its vertical velocity. The rocket fuels are called propellants. There are different types of solid and liquid propellants. Solid propellants like polymers mixed with oxidizing agents are used in many cases. Liquid propellant like liquid hydrogen along with liquid oxygen is commonly used.
Liquid hydrogen combines with liquid oxygen to give off lot of heat energy.
The reactant steam is forced in a downward direction to give the rocket a vertical thrust. The rockets have stages, as this is more practical. As the first stage fuel is burnt off, the second stage is ignited. The fuel tanks from the first stage are jettisoned. This reduces the mass of the rocket and is able to move upwards more efficiently.