With all species, semen freezing (cryopreservation) involves a precise process which suspends sperm in a mixture designed to dehydrate the cell just enough so that ice crystals do not form within (and rupture it) as the cell is frozen. Glycerol is typically the dehydrating agent for most mammalian sperm and embryos; DMSO for fish and amphibian gametes; and ethylene glycol for some embryos. With mammalian semen, egg yolk is an almost universal ingredient as well; the phospholipids providing a protective "coating" over the sperm membrane. The sperm/extender mixture is cooled at a certain rate (faster for some species and individuals than others), and is frozen in plastic straws placed on a rack in liquid nitrogen vapor. Once frozen, the straws are plunged directly into liquid nitrogen (-320 degrees F / -196 degrees C) until thawed for use. No one knows with exact certainty how long frozen semen or embryos will retain their viability, although computer models suggest that the "half life" is in the order of 20,000 to 30,000 years. Bull semen originally frozen about fifty years ago is still used each year as part of ongoing research in the upper midwest, and has shown no decrease in fertility rates so far.
Please go to your particular species of interest to obtain more information.