The spinal erectors (or erector spinae as they are also known) are a group of muscles that run up the back of the body along either side of the vertebral column.
They attach to the back of the sacrum and hip bones (innominate bones) and from there extend up either side of the spine to attach to the vertebrae, ribs and base of the skull.
While used to support the spine in general, particularly when upright, resisting the downwards pull of gravity on the ribcage, they also play a strong roll in back-bending the spine. In addition, the spinal erectors, when active, make it easier to feel your spine (as well as control it).
When active, the spinal erectors can be used to bend the spine backwards. To stretch them bend the spine forwards in a pose like bent back hero pose.
You can bend the spine forwards passively, using body weight. Or you bend it forwards actively using the abs and even the intercostals.
In a pose like bent back hero pose, your abs will activate automatically to prevent your upper body from falling back.
Note that if you have herniated disks, you'd best consult your doctor or a yoga teacher who is used to dealing with disc problems.
Stretching and strengthening muscles that work on the spine, ribs and hip bones, and practicing mobilizing the spine (using these same muscles) may help to avoid disc problems in the first place.
You can also stretch the spinal erectors in a slouch while standing (or sitting)
This could be a passive stretch (and so a genuine slouch) or an active one where you deliberately activate your abs.
In either case, you can lead the stretch by dropping your tailbone (or lifting your pubic bone) so that your hip bones tilt backwards. You can then shift your ribcage back relative to your pelvis and at the same time bend your thoracic spine forwards. From there, move your head forwards, relative to your ribcage, and drop your chin.
When stretching any muscle, (or deliberately trying to control any muscle) an important idea is anchoring it. That means making one end point of the muscle stable.
Since the spinal erectors attach at their lowest point to the back of the sacrum and the back of the hip bones, you can do this by creating a downwards pull on the ischial tuberosities or "sitting bones". These are the bones (or protuberances) you can feel when you sit on a hard surface.
You can anchor your sitting bones by using the hamstrings to create a downwards pull on them (since the hamstrings all attach to the hip bone at the ischial tuberosity or sitting bone.) However, you'll also have to make sure that the lower end of the hamstrings is stabilized. That means the knees will have to be active. Another option is to activate the long head of the adductor magnus. This muscle attaches to the sitting bone at its upper end. However, at the lower end it attaches to the bottom of the femur, just above the knee joint. So it's like the hamstrings in that it runs down the back of the thigh, but it's unlike them in that it doesn't cross the knee joint.
Another way to anchor the bottom of the spinal erectors so that you can stretch them is to move your ribcage backwards relative to your pelvis. Also move your head backwards relative to your ribcage. The weight of your upper body pressing down through your lumbar vertebrae onto the top of the sacrum will create a downwards push on the back of the pelvis causing it to tilt back (unless you resist). Your psoas will probably activate to support the lumbar spine from the front. You can then drop your front ribs and your chin to round your spine.
In either case you can experiment with pulling your belly in using your transverse abdominis muscles. This can help to further support your lower back while you stretch your spinal erectors.
In a seated position, either on a chair or on the floor, slowly bend your lumbar spine backwards as if bending around a barrel that is behind your body. While exhaling allow your lumbar spine to bend forwards.
To get a feel for your spinal erectors, try these spinal back bending exercises.
If you have tight hip muscles or tight hamstrings you may find this action easier to do while sitting in a chair. If doing it while standing, then try it with your knees slightly bent.
Because in this exercise you are trying to focus on feeling and controlling your erector spinae, focus on the movements of your spine rather than on the movements of your pelvis.
The Lumbar vertebrae are about three inches wide from side to side, so limit you awareness to an area about an inch and a half to either side of the center line of your spine. Contract this area while inhaling and bending backwards, allow it to relax and lengthen while exhaling.
Move slowly and smoothly, so that you can notice the sensations that occur when your lumbar spinal erectors contract and when they relax.
When bending the thoracic spine backwards you can focus on an area about three inches to either side of the center line of the vertebral column. That is because in this area the spinal erectors connect to the ribs as well as to the vertebrae of the spine.
If you start by tilting the pelvis forwards, you can then slowly and smoothly contract the spinal erectors that act on the lumbar spine so that the lumbar spine bends backwards. Working upwards, you can continue this bend into your thoracic spine, using the spinal erectors there to bend your thoracic spine backwads.
The feeling created can be like drawing the spine forwards into the ribcage.
Note, that because of the design of the thoracic spine, it may actually just straighten instead of assuming a backwards bent shape. However, the direction you are moving in when using the spinal erectors is a backwards bending direction.
To stretch these same muscles, you can then bend the spine forwards while exhaling, allowing the back to round.
Although the erector spinae do extend through the cervical section of the vertebral column, I would suggest that while sitting or standing that you focus on pulling the head back and up while pulling the chin in towards the pit of your neck. This action tends to lenghten the back of your neck rather than bend it backwards. This action may use the spinal erectors but in combination with other muscles of the neck and shoulders.
You may notice that a side effect of this action is that it assists in lifting the front of the ribcage.
Do this while inhaling.
While exhaling you can allow the head to move forwards and down.
An exercise for purposefully activacting the erector spinae at the neck to bend the cervical spine backwards is to slowly lift and then lower your head while laying on your belly.
In this exercise, which you can use as a prelude to shalabasana or locust pose, focus on keeping your ribcage on the floor. Instead, slowly lift your head and focus on bending your cervical spine backwards. Once you've exercised and felt your spinal erectors activating at your neck you can then focus on lifting your ribcage and bending your thoracic spine backwards from top to bottom, again while using your spinal erectors.
The advantage of doing this while laying down is that you can contract your spinal erectors against the weight of your body.
With respect to both your cervical vertebrae and your thoracic vertebrae, if you lift and lower your head and ribcage slowly enough your can use this exercise to practice feeling the individual vertebrae of your spinal column as well as your individual ribs.
With enough practice (move slowly and smoothly in both directions) you should be able to both feel and control your erector spinae. You can then expand your awareness outwards to notice the side effects of using these muscles. You can notice and feel how when you bend your lumbar spine backwards you move the front of your ribcage away from the front of your pelvis, causing your belly to lengthen. You can feel and notice how when you bend your thoracic spine backwards your front and even side ribs lift and expand.