What is a chemical pregnancy?

Emily • Hi! I`m 25 years old, married 5 almost 6 years. Been TTC almost 4 years and I`m about to give up hope.
My husband's friend is a nurse and said that I was not really pregnant with my last 2 positive tests that turned negative. I asked her to explain how that could happen and she said it was just a chemical pregnancy and to not worry. They were a few months apart, and it was devastating. What does all this mean? Was it an early miscarriage?