Adani Power interview question

Basics of electronics . How does a transistor work