There are two basic types of pregnancy tests: a blood test, and a urine test. Typically a blood test is only taken if recommended by a doctor after a urine test comes back positive. Blood pregnancy tests are more sensitive and can reveal more information about the pregnancy, and are less common than the urine test.
Both types of pregnancy tests work by measuring hCG levels in your blood. This hormone (hCG) is always present in your blood but is much higher during pregnancy. Both urine and blood hCG tests can reliably detect early pregnancy.