What you're seeing is the refinery flare system. A flare is a pressure safety relief device used throughout the petroleum industry. It is used to ensure that equipment does not exceed the limits set for maintaining the safety and integrity of a process unit.
Occasionally as part of the refinery process, more fuel gas (e.g. propane, butane) is produced than needed by the plant. The flare's function is to eliminate this excess process gas by burning it off rather than venting to the atmosphere. A pilot light at the top of the flare burns all the time (like some home furnaces), so the flare is ready when needed. The network of piping connecting the refinery processes to the flare must also have small gas surges to ensure air does not back down the flare and create a flammable atmosphere. The purged gas results in a small continuous flame at the flare.
Most flares are elevated because of the heat involved in the process. By operating flares high above the ground, the potential for igniting other equipment and endangering personnel is eliminated.
Steam is an important component of the flare process. It is used as a coolant and promotes a clean-burning flame. Sometimes the steam makes a hissing noise when it is introduced into the flare. That just means it's doing its job to cool the system and significantly reduce smoke. There are infrequent instances when the refinery experiences a process interruption, such as a power outage or earthquake. For safety reasons, equipment automatically shuts down when this happens.
The excess process gas is then consumed in the flare system. In addition, starting up plants after maintenance work (turnarounds) can increase flare activity.
Flare systems are specifically designed to handle and eliminate excess heat and fuel gas. Be assured that flaring is a controlled operation, which provides the safest and most environmentally effective method to burn off excess process gasses and to reduce hydrocarbon emissions.