It is best to transfer both loose tea and teabags from a cardboard or paper packet or tub into an air-tight container.
Tins and caddies with tight fitting lids are good as they can keep out other smells and humidity which can affect the tea.
Storing the jars in a dark cupboard will mean the tea will keep well. You should never keep it in the fridge as there is always the chance that water will get into the packet.
You should always be careful with flavoured teas, as the added flavourings can be very powerful and easily taint other teas nearby.
For loose tea it is essential that you check that the spoon or scoop that you use is completely dry.
If there is even a drop of moisture on the spoon, the humidity introduced to the interior of the packet or caddy will have an effect in the quality of flavour.