Mostly, buildings in a city are warmed with hot water circulating in warming pipes running through the buildings. There is one hot water source (warming station) for a bunch of buildings which can cover quite a big part of the city. This warming station heats the water and pumps it through the net of the warming pipes. So there is no need to have electric power in all those building at all to keep those buildings warm. The warming station is the only thing which should be able to work for this.
However small houses for one owner in suburbs can have their own (isolated) warming system. Such systems mostly uses gas or coal to heat the water and pump it through the warming pipes.
In rural areas or villages people still have a big furnace (or stove, or oven ?) within the house and keep fire with wood or coal.
As all homeless always do: Put on warm clothes. The more the better.I'm wondering how they survive the cold.