Carpmaels & Ransford Interview Question

How does a generator work?