The main function of a transformer is to **change the voltage level** of alternating current (AC) electricity. It does this by using two coils of wire (called the primary and secondary coils) and a magnetic field to transfer energy from one coil to the other.
There are two main types of transformers:
1. **Step-up transformer**: Increases the voltage (for example, from 110V to 220V).
2. **Step-down transformer**: Decreases the voltage (for example, from 220V to 110V).
This ability to change voltage makes transformers important for things like electricity transmission, where high voltage is used for efficient long-distance power transfer, and low voltage is used for safe use in homes and businesses.