The words each have several different uses:
Variation as a mass noun:
1 A tendency to vary from the norm, e.g. "There is wide variation in the sizes of beans."
..and a a count noun:
Variation
2 A thing which varies from the norm, e.g. "Bach wrote 32 variations on the Goldberg theme".
3 A difference from the norm, e.g. "There are variations in prices over time"
Variety
4 A selection of different things, e.g."There is a wide variety of beans at the supermarket."
5 A type of thing, e.g. "Moong dhall is a variety of bean."
Note that 2 is usually only applied in law (to a contract) or music (to a theme), though "variations on a theme" is sometimes used metaphorically. A commoner alternative is 'variant', e.g. "The A329 and A324 are both variants of the A320 aircraft".