How does a transistor act as a oscillator amplifier and switch?

The red line goes down and the blue line just goes all the way up. Cool right?