There can be many reasons because of which a couple opts for IVF. Woman's inability to produce eggs, man's poor sperm quality, woman's damaged fallopian tubes etc are some of the reasons why a couple is unable to reproduce child in normal way and opts for IVF.
Wiki says: In Vitro Fertilization is an assisted reproductive technology (ART) commonly referred to as IVF. IVF is the process of fertilization by extracting eggs, retrieving a sperm sample, and then manually combining an egg and sperm in a laboratory dish. The embryo(s) is then transferred to the uterus.
There can be following scenarios:
A. Embryo / baby develops inside mother's womb and mother gives birth:
Case 1. Sperm and egg belong to real parent. It is allowed.
Case 2. Either sperm or egg is not that of parent but that of someone else. Strictly not allowed.
B. Baby develops inside another woman's [called surrogate] womb and she gives birth: All such cases not allowed in islam.
No matter whose sperm and whose egg - if a surrogate gives birth to the baby then it is not allowed. In india, thailand etc surrogate mother's are those women who rent their womb in exchange of money. So this is more like a commercial activity.
Please bear in mind - this life is a test for the hereafter. Some people are tested through their children while some are tested by not having children. So adopt means that are ethically, morally and logically permissible.