Is a transistor a small electronic switch?

A transistor is used to switch electronic signals.