What does it mean

What does it mean if you had a positive test but then after it became negative ? Is it a chemical pregnancy ? What's that ? Did I miscarried ?