How long does a ruptured hymen take to heal?

I am an 18-year-old and had bleeding and pain after having sex for the first time. Why?