Several things can cause miscarriage. Chromosomal abnormalities is a common cause. Also many women have issues with the immune system causing recurrent pregnancy losses. Hormonal issues can be the culprit (i.e. low progesterone). These are just a few of the causes. If you Google "miscarriage causes" you should be able to get some good information. The causes can vary depending on which trimester you are in.
I just read that you're 7 weeks pregnant! That's awesome! Congratulations! I pray that miscarriage is something you never have to be even a little concerned about! Wish you a very happy and healthy 9 months!