Biodiversity refers to the variety of genes, species, and ecosystems on Earth. It is divided into genetic, species, and ecological diversity. Genetic diversity refers to variety within a species. Species diversity measures variety between species in a region. Ecological diversity looks at diversity at the community and ecosystem levels. Biodiversity provides humans with resources and is declining at an alarming rate due to habitat loss, overexploitation, invasive species, and co-extinctions. Conservation efforts focus on in situ protection of habitats and species in their natural environment and ex situ conservation of threatened species in special care units.