Transformers function like locks in a canal, adjusting the voltage of electricity like water levels as it travels through different parts of the grid system from power plants to wall outlets.