Transformers are often used for voltage change and isolation.
The turns ratio of the primary to secondary determines the output versus the input.
The fact that there is no direct connection between the primary and secondary winding prevents shock hazards in the secondary circuit.