The usual insulation is one that gradually erodes as the gas passes through. Small pieces of the insulation get very hot and break away from the nozzle. As they are blown away, heat is carried away with them. The other main kind of rocket engine is one that uses liquid propellants. This is a much more complicated engine, as is evidenced by the fact that solid rocket engines were used for at least seven hundred years before the first successful liquid engine was tested.
Liquid propellants have separate storage tanks - one for the fuel and one for the oxidizer.
They also have pumps, a combustion chamber, and a nozzle. They are combined inside a cavity called the combustion chamber. Here the propellants burn and build up high temperatures and pressures, and the expanding gas escapes through the nozzle at the lower end. To get the most power from the propellants, they must be mixed as completely as possible. Because the chamber operates under high pressures, the propellants need to be forced inside.