How is a transistor's input changed from on to off and vice versa?
You're going from very low level (how does a transistor switch on) to very high level (processes running in the back ground of a PC) in a single leap. This is not really advisable. If you want to study electronics then best not to start with understanding a whole PC.
If your question is really &quot;how does electronics keep doing different things when there is no external input&quot; (this is a legitimate question - &quot;how does it move from one state to the next entirely on it's own - surely at some point it would have to stop...&quot;).
Then this might be what you want:
All chips like microcontrollers / processors etc, which keep 'running' have one thing in common (besides being powered) - and that's a clock source.
This is a circuit that, when voltage is applied, keeps changing from 1 to 0 periodically, without any outside intervention. This is like a heart beat which allows all sequential processing right up to the background process running on your PC.
If you look up all the low level sub systems of a 'computer' (counters, shift registers, latches etc) you'll find they all need a clock to run.
https://en.wikipedia.org/wiki/Crystal_oscillator
https://en.wikipedia.org/wiki/Electronic_oscillator