Where is electricity generated for cities and towns?

Power stations.
Most countries operate a national Grid system. This means that all available power stations are linked together in parallel and feed the same system of wires.
Power stations all over the country can be taken in or out of use, as demand changes.
It does not matter what the driving force is for generation, hydro, nuclear, coal, gas etc. They are all connected to the same system of power distribution, that takes the power into cities and towns.