Only in relatively recent years have artificial insemination and resultant issues of the rights of the surrogate, donor rights, and custody of embryos, come into existence. For those who wish to find an alternative to both natural birth and adoption, this is a great blessing, but it also involves many unique legal questions (and so an experienced family law lawyer should be consulted.)
However, surrogacy can also take the form of a woman giving birth to a child for another couple because of the inability of a spouse to give birth herself. This may or may not involve artificial insemination.
In all cases, there are detailed contracts involved in surrogacy agreements that are important for protecting the custody rights of the "adoptive" parents to the child and that may involve stipulations like banning the surrogate from getting an abortion unless her life is in danger due to the pregnancy or stipulating she cannot smoke or drink alcohol during the pregnancy and must follow a specific healthy diet.