Chimneys operate on the principle that hot air rises because it is less dense than cold air. When a chimney is filled with hot gas, that gas tends to rise because it is less dense than air outside the house. The rising hot gas creates a pressure difference called draft which draws combustion air into the appliance and expels the exhaust gas outside. The hotter the gas compared to the air outside, the stronger the draft.
To learn more contact your local certified chimney installer and remember to check local codes.