The basic principle
behind a rocket is Newton's Second Law: "To every action there
is an equal and opposite reaction".

A rocket
firework throws mass in one direction and benefits from the reaction that
occurs in the other direction.

The mass comes from
the weight of the black powder that the rocket engine burns. The burning
process accelerates the mass of fuel so that it comes out of the rocket
nozzle at high speed. The fact that the fuel turns from a solid into a
gas when it burns does not change its mass, because all the oxygen needed
for combustion is contained within the rocket's fuel. In other kinds of
combustion the mass of products is greater than the mass of fuel because
the fuel reacts with oxygen from the air.