Generally speaking, there are two types of surrogacy: Traditional Surrogacy and Gestational Carriers.
In Traditional Surrogacy, the surrogate is the biological mother of the child. Sperm from the biological father is used to impregnate the surrogate via IUI or IVF, who then goes on to carry the pregnancy.
In Gestational Surrogacy, the eggs are provided by the intended mother or an egg donor, and the surrogate has no genetic relationship to the baby. Embryos are formed using those eggs and sperm of the intended father which are then carried by the surrogate. Women who can produce healthy eggs but cannot carry a pregnancy for medical reasons often use this approach without an egg donor to have children to whom they are genetically related.