Micron Technology interview question

How does a transistor work?