A good general definition of ex-situ conservation is “off-site conservation,” or a method of conservation that can be done outside the natural habitat. Examples include sperm and egg banks as well as zoos and botanical gardens, as the previous answer suggested.
Ex-situ conservation is meant to help species keep a healthy population by removing them from predators and other conditions that could lead to poaching, extinction, etc.
However, there are some drawbacks to this. Whatever is being conserved this way has to be able to survive the new conditions. It often leaves several very localized species at risk or in danger of extinction. Often, endangered species are not good candidates for this kind of conservation, leaving them in danger of going extinct.
Ex-situ conservation is defined at Differencesbetween.net as the “conservation of biological diversity outside their natural areas and is done through different methods like captive breeding, botanical garden, zoos, aquaria, and seed, sperm and egg banks. Ex-situ conservation has advantages and disadvantages.
Advantages of ex-situ conservation include the protection of species from external threats like poaching, processes for selective breeding, and the reintroduction of organisms that had left or disappeared from their natural habitat. Two big disadvantages are that this type of conservation can only be considered for a few kinds of species, and rare species still remain under threat.