The substance hCG is produced naturally in pregnant women, beginning early in pregnancy and peaking at around the 14th week. Some pregnancy tests are based on checking for hCG in a woman's urine, and the risk of birth defects can also be assessed by examining the level of hCG.
One of the important roles that hCG plays in the body is making sure that the developing fetus gets the nutrients and calories necessary for proper growth, without much dependence on the woman's food intake. It does so by accessing the fat stored in the woman's body and making it available to the fetus. Humans tend to like fatty foods because we are historically "programmed" to store up bodily reserves against possible lean times to come. For women, that excess fat usually ends up in the hips, buttocks, thighs and abdomen. When a woman is at the beginning of her pregnancy, at a time when she may not yet be aware that she is pregnant, the hCG in her blood ensures that the fetus gets the "food" it needs, even if the mother is not yet eating for two. The production of hCG slows after the first weeks of pregnancy, at which point the woman is more likely to be conscious of eating to sustain her own and her fetus' health.
HCG stands for human chorionic gonadotropin. The "gonadotropin" part means that it helps promote genital development. It has been used to treat boys with disorders of the pituitary gland whose genital development is delayed. Not only is hCG useful during pregnancy, it can also help women get pregnant. This phenomenon was noticed soon after the hormone was discovered by doctors in 1927. Within a few years it was being used as a fertility treatment and has FDA approval as such.