A formal definition for a transistor would be a electrical component that has a semiconductor and either amplifies or acts as a switch to an electronic signal.

Transistors more specifically can take a current as an input, and transmit a larger current as an output. This interaction is defined by a property transistors exhibit called gain. This property is defined by a small current being applied to one pair of a transistors terminals in order to control a much larger signal using another pair of terminals. This leads transistors to be used as an amplifier.

Transistors can also be used to recieve current and turn the current on or off. When used in a circuit, the transistor is acting as a switch. This means that the transistor can determine the current being ran at a specific point depending on the overall structure of the circuit.

Over all, the transistor in simple terms is used to store one of two possible states: one or zero. By using the transistor in this manner, a large amount of transistors can be compiled together to make complex circuits such that one approaching the millions and billions, the computer chips will have enough power to do the complex work we use computers for every day!

While there are many, many, more parts involved in computer architecture, the transistor is one of the building blocks to how our computer chips function. Furthermore, opinion warning, it is important to understand these simple ideas of computers even if you do not directly work with architecture. These concepts help form the understanding of how software engineers turn high level programming languages into actual functioning products. It is all part of a large process including both software and hardware elements. At the end of the day, they really are quite the same thing when you boil it down!