Mike,
There are two components to your spine: the posterior elements and the anterior elements. The posterior ones are all the pokey bits that you can feel under your skin – they are comprised of the facet joints, the nerve roots, tons of ligaments and the small stabilizing muscles of your back. the anterior element is the disc, the end plates (that's what attaches the disc to the vertebral body above and below), and the vertebral bodies themselves.
When you stand up or walk (or bend backwards), you are putting (slightly) more weight on those posterior elements and (slightly) unweighting the anterior ones. When you sit down, you tend to load the anterior elements and unload the posterior ones.
So people with more pain at the posterior elements (nerve roots, facet joints, muscles, ligaments) TEND to have pain with standing or walking, and TEND to get relief with sitting.
People with a problem in the anterior elements (disc, vertebral body, end plates) TEND to have more pain when sitting and relief with walking.
If you have more pain when lying flat, that usually indicates poor muscle control (since you are relaxing your voluntary muscles when lying flat, but if you don't have good core muscles deep inside – the ones that are supposed to be on 24/7 – then the bony parts of the spine don't have good support and they hurt.
If you have pain after being in one position for a long time, but then feel better with movement, that TENDS to mean an inflammatory component rather than a mechanical one, whereas if you feel better with rest and worse with movement it's more mechanical.
Take these for what they are, patterns and nothing more. There is a ton of variation here, obviously, and very few of us fit into one of these completely (usually it's a mix of all kinds of stuff – which is why diagnosis is so difficult sometimes)