How does the Peter Principle work?

How does the Peter Principle work?