A PNP transistor consists of two P-type materials with a N-type material sandwiched in between. A NPN transistor consists of two N-type materials with a P-type material sandwiched in between.
For a PNP transistor to conduct, the base which is made of N-type material has to be connected to the negative voltage. The connection should look like this. The transistor switches off when connected to the positive voltage.
In the NPN transistor, the base which is made of P-type material should be connected to the positive voltage. The transistor will switch off when connected to the negative voltage.
PNP and NPN transistors can be identified by checking the polarity of the PN junction. An PNP transistor has on PN junction and one NP junction. Thus a simple check to identify the polarity of a diode can be used here. Connect a multimeter positive to the base of the transistor and the multimeter negative to the emitter of the transistor.
If it shows low resistance the junction is in forward bias. The transistor is a NPN transistor. If it shows high resistance, the junction is in reverse bias and the transistor is PNP transistor.