How transistor acts as a switch?

When you turn it on, it conducts, when you turn it off it doesn't conduct. Just like a switch.