You can build logic gates out of 2 or 3 transistors, and combine those logic gates into more complex gates until you've got a computer.
But how does a transistor work? Basically, you've got semiconducting materials of two types (Phosphorus or Boron doped silicon), one of which wants a few more electrons to be a conductor, and the other wants a few less electrons to be a conductor. If you stick the two types next to each other, the electron-wanting (N) one snatches up the electrons from the electron-offering (P) one, and you get an Electric field going from the P to N. Now, that alone makes a diode. Already cool, nonlinear electronics. But what if we go N-P-N? Now we've got two electric fields, going opposite directions. With three leads, you can adjust the strength of those electric fields with one, creating a variable resistor, a transistor.