Transistors can be regarded as a type of switch, as can many electronic components. They are used in a variety of circuits and you will find that it is rare that a circuit built in a school Technology Department does not contain at least one transistor.

Transistors can be used to create simple electronic switches, digital logic, and signal amplifying circuits. In quantities of thousands, millions, and even billions, transistors are interconnected and embedded into tiny chips to create computer memories, microprocessors, and other complex ICs.

There are hundreds of transistors which work at different voltages but all of them fall into these two categories.