If a criticism or description applies to you, then you should accept it as true. When something said about people in general applies specifically to your situation, acknowledge it.
This phrase evolved from the older saying 'if the cap fits, wear it,' which dates to the 18th century. The 'shoe' version became popular in America in the 19th century, possibly influenced by the Cinderella fairy tale where the shoe fitting proved identity. Both versions mean accepting applicable criticism or descriptions.
The shift from 'cap' to 'shoe' in American English might reflect democratic values - caps were often associated with social class and occupation, while shoes were more universal. The Cinderella connection is fascinating because it inverts the meaning: in the fairy tale, the shoe fitting is wonderful, but in the idiom, it usually means accepting unflattering truths about yourself.
Complete word intelligence in one call. Free tier — 50 lookups/day.