It's a whole theory. Not really something that can be explained in a few posts, though I'm sure someone could. It includes the data sheets, understanding transistor function and biasing, and how everything interacts. And Math! Math is the language of electronics. In DIY, unfortunately, there's...