1. Check the package.
2. Identify all the marking on the component.
Either there is Manufacturer logo or Code.
Search those code via the links below.
Or others source.
3. Refer to the original Schematic diagram/ Bill of material.
4. Check the parts with device such as (LCR-T4) Model Transistor Tester. To verify it is transistor, diode or even N-channel/P-channel.