I'm scared of having a miscarriage

What really causes a miscarriage? ??does stressing and thinking too much lead to that??please help am scared