What does 'Paint yourself into a corner' mean?

If someone paints themselves into a corner, they get themselves into a mess.

Idioms similar to 'Paint yourself into a corner'

See also: