More or less every plane today has five main types of lights, commercial airliners have more. Here is a guide to identify them.
Navigational Lighting/Position Lights: These represent the red light on the left wing, the green light on the right wing, and often the white light at the rear of the aircraft. These lights should be kept on when power is being delivered to the aircraft at all times, particularly at night, regardless of whatever is occurring around you. They help pilots, ground crew etc. identify which direction your aircraft is facing.
Beacon/Anti-Collision Lights: This is the red flashing light at the top and bottom of an aircraft that flashes repeatedly every second or so. This light should be turned on if any of the following criteria are met: the hydraulics are on; the engines are running or above 1% power; the aircraft is moving; the cabin is pressurised. The beacon should be switched on prior to any of these circumstances being met, and switched off if flying over a warzone.
Strobe Lights: The strobes are the flashing lights on the ends of the wings and rear of the aircraft. They must be switched on when entering the runway, or off once vacated, and must be kept on throughout the flight. Strobes should be turned off, at the pilot’s discretion, if flying through cloud or fog, as this is likely to disturb passengers.
Taxi Light: The taxi light should be switched on when taxiing. It allows pilots to see what is in-front of htme whilst taxiing, without the light being too bright for 3rd party people. It should be switched off if the aircraft is not on a taxiway, or if the aircraft is not moving.
Landing Lights: These aid the pilots in seeing any obstructions whilst taking off and landing. Often with left/right landing lights and seperate lights for take off and landing. They should be switched on once cleared for takeoff, and off above 10,000 feet, and vice versa for landing.