Hcg levels

When do they testing for hcg levels? This is my second time around being pregnant. The first time I don’t recall being told about hcg levels. So I’m honestly wondering how all that works