How do I know if which leg is the emitter or the collector? (Transistor)
Set meter to lowish ohms range so a diode conduction can be seen - trial and error OR diode test if available.


With an NPN transistor the base will have two diodes facing away from it. ie with most positive meter lead on the base the other two leads will show a conducting diode when the negative lead is placed on them
With a PNP  transistor the base will have two diodes facing towards it. ie with most positive negative (usually black) meter lead on the base the other two leads wil show a conducting diode when the positive  lead is placed on them


OK - now you know NPN from PNP and which is base. Now


Connect positive to guessed collector for NPN and negative to guessed emitter. Set meter to 1 megohm plus range.

-Connect base to guessed collector via a high value resistor - probably 100k to 1M. A wet finger works well. Note reading.


Now swap guessed emitter and collector and repeat. Again resistor is added from base to guessed collector. Note reading



One of the two above will have a much lower R_CE reading when base is forward biased. That's the correct guess. 

Once you get used to this you can pick up a leaded transistor, juggle it with meter leads till you find the two diodes giving base and NPN or PNP then lick your finger and do a forward bias base test - and then declare pinout. Looks like magic to many. Works.

You can or course formalize that on a breadboard and even add (gasp) switches to swap polarity etc. 

Note that you can get some idea of Beta (current gain _ from this once you learn to calibrate your wet finger.