Transformers are used for Voltage conversion. Common uses of transformers include:
Step Down - taking the 240 Volt output form a generator and stepping down to 120 Volts
Step Up - taking the 120 Volt output from an inverter and increase to 240 Volts, typically for operation of power tools or well pumps