That is a very good question because if a non native speaker looked the words up in the dictionary they seem to mean the same thing although as a native speaker they do mean different things to me. Diversity and variety are sometimes synonomous and can be used interchangeably.
Both words mean the absence of uniformity but they are used differently too.
Variety is usually used when talking about animals and plants whereas diversity would more likely be used when speaking of people. Variety is used when describing a category within a species based on some hereditary difference. An orchid is a flower but it isn �t your common garden variety which is an expression.
What a variety of flowers you have in your garden!
There is such a diversity of people in the United States.
Variety is also used when describing entertainment of a mixed variety. So a "variety show" is one where singing, dancing, acting etc. is included. In this case, I �ve never heard of a diversity show. :)
I think the difference is so slight that in most cases you can use them interchangeably.
Hope this helps.