Hot gas in a reactor is usually cooled in a heat exchanger
adjacent to the core. In gas-cooled reactors, the circulated gas
acts as the coolant, and it must be circulated through the core and
then out and through an adjacent heat exchanger before being
recirculated. In this way, the heat generated by the core can be
used in secondary systems and the core can be kept cool. The heat
might be for, say, the generation of steam to drive a steam turbine
which generates electricity via an attached generator. Gas-cooled
reactors were among the original designs offered for reactors, but
are still being refined. Use the link below to the Wikipedia post
on the advanced gas-cooled reactor and look at the diagram. You'll
see the heat exchangers where useful energy can be collected from
the circulating main coolant, which is a gas like carbon dioxide or
helium.