Rockets were invented by the chinese hundreds of years ago; and have many uses including weapons, and peaceful uses such as fireworks and going to the Moon. *

Modern liquid rockets were invented by Robert Hutchings Goddard when he used a De Laval nozzle on a combustion chamber. The Nozzle turns most of the pressure and temperature in the combustion chamber into a supersonic gas flow, raising the efficiency from single digit level into the high 80s, making it one of the highest efficiency heat engines known.

In fact that invention leads to the definition of a rocket. A rocket is a vehicle with one or more rocket engines. It sounds like a trivial definition, but it turns out that not all vehicles that travel through space necessarily have rocket engines (for example solar sails or electromagnetic tethers may be employed instead in some cases.)

See costs of launching to orbit.

* - actually rocket engines were invented a lot earlier Archytpus allegedly built a steam powered bird that ran along a line, but there's hardly any description of whatever that was, but Hero of Alexander built the aeolipile which is a steam rocket with two nozzles on a bearing. It's similar in concept to the rocket tipped helicopter rotors that exist; and it clearly is rocket powered since all the propellant comes from the water tank/boiler at the base.