Miscarriage questions

So sorry to the women who have suffered a previous loss. I never knew how common it could be. But did something tragic happen or you just woke up one day and started to bleed? Do you know if anything can help prevent it and how far along we’re you?