How to get a posebones global tail position
If you have your armature object as arm, you can get its nth bone’s tail local position (i.e. its pose location in armature’s object space) with arm.pose.bones[n].tail, so to get that in world coordinates, just multiply it with the armature’s world matrix: arm.matrix_world * arm.pose.bones[n].tail.

Note however it may be simpler (in simple cases) to use a bone constraint like Floor or Limit Position ones…