A gas flare, instead known as a flare stack, is a gas combustion device used in industrial plants such as petroleum refineries, chemical plants, natural gas processing plants as well as at oil or gas production sites having oil wells, gas wells, offshore oil and gas rigs and landfills.
Why it is done because there are some gases in the extraction of crude oil which are very dangerous for the equipment of that plant or refinery and most importantly for the environment. Basically the fire shown at the top of kelvins in the oil fields is the burning of those toxic gases.