Gas hot water systems burn gas to heat water which generates far fewer greenhouse gases than using electricity from the grid. Gas systems can come in either a gas storage water heater, or a continuous flow/instantaneous water heater.
Gas storage hot water systems will usually have a continuously burning pilot flame which ignites a burner to heat the water in the tank when it is required. Usually the unit will have a thermostat which tells the system to heat the water in the tank if it drops below a specified temperature.
A continuous flow or instantaneous gas hot water system doesn’t have a storage tank as it simply heats the water via a gas burner which is activated when a hot water tap is turned on in the house. It only heats the amount of water that is required instead of continuously heating a full tank which means they can have large energy and cost savings. More importantly, what this means for the consumer is that with a continuous flow system you will never run out of hot water.
For a detailed explanation on how all types of gas hot water systems work see here: https://www.yourhome.gov.au/energy/hot-water-service