Could be a number of things. Your doctor should be able to run tests to figure out what's wrong.
You're 18, you shouldn't be trying to conceive right now. Get on birth control, and focus on school, your education, and building yourself.
I know how you feel. Im 19 & last year I lost 2 babies as well. I dont know what went wrong either, but almost a year later, im pregnant again & hoping for the best.
We werent planning it, but why let the miscarriages discourage me from celebrating this baby now? What happens, is gonna happen. You just have to trust in God.