Question about pregnancy “levels”

When people talk on here about their hcg levels, how do they know? Is it a blood test or urine test? I went to my first prenatal appt and got an ultrasound and a urine test but she didn’t mention anything about my levels. The only blood work she mentioned was for the first trimester screening.