Relax -- it's not common. The penis has no bones. It has chambers dick fill up with blood when you're erect. If you push too hard and bend it too far, this chambers can tear.
It can happen if you slip out during sex and thrust against your partner's body. Along with pain, you might hear a popping sound. Afterward you may be swollen and bruised.
Surgery is usually the best treatment. Some boys are born with erections.
Ultrasounds show that babies can have them in the womb.