onsemi Interview Question

Explain how bjt and mosfet transistors function.