What is a chemical pregnancy??

How do you know if you've had a chemical pregnancy? I had never heard of that until I joined this ap. Is there any way to prevent it?