What is an Inverter and how does it work?