How to "ground" a character's legs? I would like my character to stand on one leg.

On pose one it would be standing on the ground:



And on pose two it would be standing on its left leg kind of like this:



but when I select all the bones except the leg and then rotate the whole shape rotates and the leg doesn't seem grounded on the floor anymore:



I believe it has to do with parenting the bones? It's hard for me to know what to look for to solve this and I'm just a beginner with rigging. I've tried all sorts of things in the Bone Constraints panel but couldn't find one that did this. I also tried playing with weight painting but I think it messed things up more than anything else.
What are you looking for is called Inverse Kinematics (IK):

In edit mode extrude a new bone from the leg (I called it "Foot On Ground") which will be the target of the IK Chain. Set it to "non deform" (uncheck the relative button in the bone properties panel) and parent it to the chest bone.
In pose mode select the leg bone and assign her an IK constraint.
In the empty boxes select "Armature" (it's the name of your armature) and "Foot On Ground". Set the IK chain lenght to 2.
Now the IK chain, 2 bones long (leg and hip Left) will always "point" to the target bone (Foot on ground).



I suggest you to copy some simple estabilished rigs before building your own, trying to understand the basic concepts. Search for Nathan Vegdahl rigging serie (free on Youtube) for an amazing advanced rigging course, from scratch to humane rigging.