Questions on General Use of Transistors

MAXOFLIFE:
How do I know what kind of transistor works in a certain situation?

You look at the data sheet of the transistor and see if it matches what you want.
The major things are type ( PNP or NPN ) the maximum collector current, the power dissipation, the gain and the package type.

I know that is easier said than done and there are a lot of transistors out there. However there are selection boxes on the web sites of major distributors where you can tick the characteristics you want. For example on the Farnel site if you just put in transistor there are just over 27,000 types. So narrow it down to just junction transistors (bipolar) and there are a mere 3,500 or so. But you do get a filter so you can tick the characteristics you want. See this link:-

Note you can also arrange the results in price order.
In practice just stick to three of four transistors.