In reality to have a baby is simple: you find a partner, have unprotected PIV sex for a few months, and get pregnant. However, the process can be a lot more complicated for some people. A condition called polycystic ovary syndrome, or PCOS might be present along with infertility which is defined as not being able to get pregnant after a year of trying. Therefore, the consideration of using IUI or IVF might be necessitated. These are both methods of reproductive assistance, meant to achieve a successful pregnancy.
IUI is an acronym for intrauterine insemination whereby healthy sperm is placed in the uterus as close to the time of ovulation as possible. The placement of sperm directly in the uterus at or near ovulation (which can be determined through tests such as an ovulation predictor kit, or OPK increases the chances of conceiving and utilizing a drug called Clomid will also help to insure ovulation. In addition, there is a technique called sperm washing where individual, healthy, motile sperms are isolated from the semen before being used for IUI, in the hopes of further increasing the chances of fertilization.
In regard to IVF, it is more invasive and more complicated. It can be an important tool for people with certain reproductive challenges, such as being of an older age, having a partner with poor sperm quality, going through frequent miscarriages, and having blocked fallopian tubes. However, IVF a greater success rate of approximately 40% with variations in each client. IVF also has the added benefit of fertility preservation in that having the possibility of additional embyros that can be frozen to use for the future.
In conclusion factors, including age, the quality of sperm you're working with, individual health, and, of course, budget, will help dictate which procedure may be better for you.