Notice how the LEDs typically have one leg longer than the other; this is called the "anode".
The colored case also has one flat side, opposite the longer leg; the leg on this side is called the "cathode".
Also, note the distinctive shape of what is inside the colored case; this can also be used to help determine its orientation. The gap at the top of the metal surface is always on the anode side.
LEDs can only be used the right way round so determining orientation is important.