Round hole?
Check the distance from the center of the ball to the center of the hole (distance formula.) If the radius of the ball plus the distance from the center of the hole is less than or equal to the radius of the hole, you have fallen in the hole.
If the distance from the center of the ball to the center of the hole is less than the radius of the hole but not "fallen in," treat the motion of the ball as a vector and deviate the direction and movement of the vector to account for falling into the hole. Choose a deviation that feels right for your program. It could be proportional, exponential, whatever.
Check the distance from the center of the ball to the center of the hole (distance formula.) If the radius of the ball plus the distance from the center of the hole is less than or equal to the radius of the hole, you have fallen in the hole.
If the distance from the center of the ball to the center of the hole is less than the radius of the hole but not "fallen in," treat the motion of the ball as a vector and deviate the direction and movement of the vector to account for falling into the hole. Choose a deviation that feels right for your program. It could be proportional, exponential, whatever.