A transistor is a semiconductor device that amplifies or switches electrical signals and power. It is one of the basic building blocks of modern electronics.