First find out which category the cap is in – bayonet, edison, or pin. If it has pins on the side, it's probably a bayonet. If it screws into the fitting, the bulb is probably an Edison type. If there are pins at the bottom of the cap, it’ll be a pin cap. Then you can measure the diameter of the cap or the distance between the pins to find out the specific type.
Alternatively, the type of cap may be printed on the lightbulb for easier identification.