In general, civil unions were designed to provide rights and benefits to couples living as if they were married but who have not legalized the union through a formal ceremony.
In many countries, a civil union is the same as a registered domestic partnership and both grant all the rights and responsibilities of a heterosexual married couple. Denmark was the first country to legalize such a union back in 1989 and many other countries have since followed. In the U.S., only a handful of states offer civil unions, none of which are recognized by the federal government.
In Vermont for example, civil unions were created to appease a Supreme Court ruling that ordered the state to extend the same benefits and rights to same-sex couples as was extended to married couples. To appease both sides of the argument, the civil union was established, allowing same-sex couples to receive their benefits without granting them the right to marry.
The primary difference between a civil union and a registered domestic partnership is that civil unions are formal ceremonies performed by a state official, such as a judge or magistrate. Registered domestic partnerships on the other hand are primarily found in municipalities, although there are a few states that have statewide registries.