How to distinguish PNP and NPN transistors?
This is pretty easy.  I used to do this routinely in high school when salvaging parts from unknown discarded boards.

As Spehro said in a comment, sometimes you can find a part number.  In that case, you can find the datasheet and get the parameters outright.  However, all too often there is no manufacturer's part number, or its just a short code, or its a in-house number.  Especially with the smaller packages, you're going to have to experiment.

First, make sure the ohmmeter is not set to some extra low voltage mode intended to not forward bias diodes.  Some meters have such a feature.  In this case, you definitely want to forward bias the junctions.

A bipolar transistor has only three leads, so only 6 possible two-wire measurements when taking polarity into account.  From the view of probing with a two-wire ohmmeter, a bipolar transistor looks like two diodes back to back.  There is one B-E and one B-C.  In a NPN, it takes positive voltage on the base relative to E or C to make the diodes conduct, and the other way around with a PNP.  The "N" and "P" in the names tells you the voltages required to make the diodes conduct.

Figuring out whether you have a NPN or PNP and which lead is the base is therefore easy.  The next problem is to figure out which are the C and E leads.  On most packages, C is in the middle.  On a power package, C is usually connected to the case or tab or whatever.

Another way to test for C versus E is to measure the gain.  A transistor will still work with C and E flipped, but the gain will be higher when connected as intended.  I usually did this by connecting the meter across C-E.  With the base floating, there should be no current so the meter should read infinite resistance.  Now use your fingers to bridge C and B.  You should see a lower resistance than if you used your fingers to bridge C and E.  That apparent lower resistance is due to the transistor amplifying the base current.

Now run the same test with C-E flipped.  Most of the time, one orientation has a obvious higher gain.  If not, then you can run this test with a real resistor instead of your fingers.