Nozzles are said to be the most important component in a rockets, building such nozzles is also arguably the most difficult to build aswell. The nozzle directs the flow of exhaust coming out of the rocket motor, newtons third law states that every action has an equal and opposite reaction, so if your exhaust comes out of the engine quickly you can say your rocket will move upwards quickly too.