(The following statements come from my experience, not medical facts so take them as my personal advice but not absolute law!) I didn't get flexible because I was naturally gifted, nor because I was strong. I did get flexible because, most of all, I learned to relax my body.
You can hurt your muscles and joints in several ways, but mainly with: sudden fall/unexpected movement, overstretching, pushing a contracted muscle to stretch.
The first one can be happening from everyday activities or quickly entering/exiting a position without giving the muscle enough time to lengthen/shorten (dropping into a split with no warm up, getting out too fast from a split/oversplit).
Overstretching (going where the muscle is not yet ready to go, too deep) is a common mistake when trying to increase flexibility so you have to learn the difference between pushing close to your limits and really damaging your muscles, ligaments or tendons. Usually a sharp acute pain is a bad sign, while a progressive, uncomfortable "lengthening" feeling should be fine. Overstretching can cause strains/sprains that can take few days to months to heal (sprains -injury to ligament- take longer). You want to avoid that to not hinder your progress.
Pushing a contracted muscle to stretch is really not a good idea for several reasons. A muscle that resists a stretch doesn't want to be bent, it's tensing to escape the stretch. When you start stretching deeper, that is going to be the first instinctive reaction your body will do. You can read about it in anatomy books, how your muscle initially react to a stretch stimulus is with contraction: a mechanism of defense (remember your body is very dramatic and fearful, always thinking you're up to no good ;) ). If you try to stretch a contracted muscle you'll create injury (tear, strain), so the greatest effort you have to do when trying to increase flexibility is LEARNING TO RELAX INSTEAD TO TENSE UP. This is the most basic concept of passive stretching, but seems like nobody talks about it. We as adult have a hard time relaxing, our muscles only relax in situations we're not even aware of (sleeping, sitting - we don't think about it) so learning consciously to tell a muscle to relax, especially in quite challenging positions can be very difficult, but necessary. There can't be lengthening without relaxation. To further support my point, I want you to look at these two pictures:
On the left side, I'm tensing my glutes and back muscles after getting into cheststand. On the right my glutes and back muscles are relaxed. Can you tell the difference? On left I feel discomfort and tension in neck, shoulders, back and hips/glutes, breathing is harder and my upper and middle back are barely bending. If I stay in this position, there won't be a way to move further, because I'm tensing. In the right picture I breathe better and feel an even stretch throughout my spine, my hips are lower and my neck and shoulders are open, I could go deeper (for example, start straightening my legs). Please understand this is not an example which applies to beginners, but it's to make you see the difference between tensed and relaxed.
Of course if you're starting out with cheststand, your body will enter the position tensed and you won't be fully relaxed till your feet touch something (a chair, if the floor is way too far). But learning to relax will help you so much to improve and automatically exit the "panic mode" you'll experience at the beginning. How do you relax into a challenging position, in which your body wish to get out as quickly as possible instead? BREATHE. Breathing - even shallow breathing - and relaxing are key to bend !
I hope you found this helpful, remember it's only when you relax that your body stop being scared and allows you to move further. Always warm up for at least half hour before trying challenging stretches and make sure you got down the right technique first!!!
Thanks to my coach Otgo Waller who explained me many of these concepts :)
Happy bendings and Happy Thanksgiving too!