The purpose of a refugium is multifaceted.
Primarily it is a part of the sump utilised to grow macroalgae under a grow lamp. The macroalgae thrives on nutrients in the system and will utilise nitrates in a saltwater aquarium to grow, thereby reducing them. The most common macroalgaes in use are cheatmorpha and caulerpa, both of which are easy enough to come by from sites such as ebay or dedicated forums or groups such as Facebook as well as other local aquarium owners.
These macroalgaes can be free floating, or in the case of caulerpa, planted into a substrate. You can see the pros and cons of two of the most popular here.
A refugium can become a harbourage for amphipods and copepods to breed and proliferate, and eventually become free live food to your fish.
Macroalgae also provide a means of oxygenating the water. As with any plant, they will use the CO2 in the environment and release oxygen back into the water.