Leidos Interview Question

What is a transformer used for and how does it work?