Intel Corporation interview question

Describe how a transistor works?