Transistors are like electronically operated switches. They are also used for amplification in Hi-fi's. Note; on the larger picture three are three legs. This is usual for transistors.
Integrated circuits can contain 100's or 1000's of transistors, resistors and diodes. They are used for specialist tasks. There are 100's of IC in your computer!
These are the forerunners of transistors, and were used before the invention of the transistor in the 1950's. It is argued that valves give a better sound quality when used in amplification.