A transformer is an electrical device that is used to change the voltage in alternating current (AC) electrical circuits. The ability of this device to change voltage is a major advantage of AC electricity over direct current (DC).