What does 'Pay the piper' mean?

When you pay the piper, you have to accept the consequences of something that you have done wrong or badly.

See also: