What is the meaning of [when you are in a hole, stop digging]

When you have landed yourself in trouble, such as through a foolish remark or action, do not say or do anything to make the situation worse.