In case you have ever wondered how modern, tiny power supplies achieve galvanic isoluation, this is certainly due to flyback converters, which use a single switch to drive a transformer.
Just for fun I tried to build a simple flyback demo circuit from spare parts and succeeded. It is not pretty but works for demonstration purposes. This is the schematic:
And here is a photograph of the circuit on the perfboard:
The next step is building a more sane isolated switching converter.