A Transistor is simply a block of Semiconductor material which drove the silicon revolution. Each single transistor effectively an electronic switch. When you supply current to its base, a current is allowed to flow from the Collector to the Emitter.
These pretty much replaced old Electronic Valves - although for some audio applications Electronic Valves are used because they give a unique sound - this is actually due to noise and imperfections - but it also made the sounds "richer".
When these are combined in small numbers, you can build Boolean gates - and then combining these more complex control systems. It is at the far end of these, with millions of transistors that you find the CPU's, MicroControllers , graphic chips etc that go into the common robots and personal computers.
Transistors may also be used to amplify signals - if a lower voltage is used to control a much higher one, and with some transistors this can be done proportionally instead of "all-or-nothing".
Time to build your own robot! Using a Raspberry Pi with parts and some time, you can use my book to learn how to make and program a robot with automatic behaviours.