Blender 3D: Noob to Pro/Advanced Tutorials/Advanced Animation/Guided tour/Const/fl

Using the floor constraint will keep a bone from passing through an object from a given direction. It is useful when making floors of course but also when making walls and other items which are obstacles for the armature.

There is also an offset value which is very useful when say for example you have a foot where the mesh stretches down below the actual tip of the armature you can then use the offset to make the bone stop before it actually reaches the obstacle object.