What happens if your hymen or vaginal opening rips or tears and then bleeds when having first time sex?

Usually nothing. The hymen is like you appendix, you really don't need it. Once torn there is minor bleeding & it self heals and remaining edges regress & are tucked out of the way.
Heals itself. The mucosa or "skin" of the vagina usually heals itself along the edges of the tear. Rarely the tear may continue to bleed and may need stitches. I must stress that this is extremely rare.
You end virginity! This is often what happens. You may have pain and irritation for a few days and may need to wear a pad and may need to sit in a tub of cool or warm water and may need to use some vaginal topicals. If there is concern, you may need to see your pcp or gyn but otherwise, this should be self limiting. Use caution, lubricaiton, gentleness with insertion of the penis and slow down and take it easy.