Depending on how the furnace is wired, the pilot may or may not go out.
Transformer Powered Gas Valve
In some installations, the gas valve is powered by the 24V transformer. In a situation like this, a thermocouple is used to detect the flame. The voltage generated by the thermocouple is sensed by control circuitry, which in turn controls the operation of the gas valve. If the furnace loses power, the transformer is powered down, the gas valve closes, and the pilot goes out.
This seems to be found less in newer furnaces, though may still be encountered from time to time in older installations.
Self Powered Gas Valve
In other installations, a low voltage gas valve is used in conjunction with a thermopile. This allows the pilot to stay lit, even when power to the furnace is lost. With a setup like this, the heat from the pilot actually provides all the power the pilot assembly needs to control the valve. Which means as long as the pilot is burning, the valve will stay open (given the thermopile does not fail).