HPTs work by identifying the hormone hCG, which is produced by the placenta shortly after the fertilized egg attaches to the uterine lining. When you urinate on the test strip or dip it into a urine sample, the test detects the level of hCG and indicates a positive or negative result based on the presence of the hormone.