A pregnancy test HCG (human chorionic gonadotropin) functions by detecting the presence of this hormone in a woman's urine or blood, which is only produced by the placenta during pregnancy, thus indicating whether or not she is pregnant; a positive result means the hormone is present, signifying pregnancy.