What is the difference between a chemical pregnancy and a miscarriage?

I’m so confused.