Mind your Ps and Qs can mean to be careful, vigilant, or, more often, polite. For example, a mother might mention that Aunt Gertrude is a stickler for manners and the children had better mind their Ps and Qs when she visits. There are several suggested origins for the phrase, which often differ from the way it is now used.
In the 17th century, the letters stood for "prime quality." Ps and Qs were often written as pees and kews. It is cited in the Oxford English Dictionary as having been used in a quote in Rowland’s Knave of Hearts. A character orders alcohol and asks that it be Pee and Kew, suggesting prime quality.
In the 19th century, the term became associated with the difficulty of learning which way these letters faced in the lower case. Teachers told students to learn their Ps and Qs. This could have been similarly applied to other lower case letters like Bs and Ds, however. Also dance teachers may have enjoined students to remember their pieds and queues, two dance moves.
Another possible point of origin for the phrase is the practice of bartenders keeping marks on tabs of ale served in pints or quarts. A person with little money might enjoin the bartender to mind his Ps and Qs to avoid being overcharged. In fact a bartender who didn’t mind them could be accused of cheating his customers.
Some suggest that the letters might be an abbreviation for please and thank you. This connects most with the current meaning of the phrase. Clearly someone who is minding his or her manners would likely remember to say please and thank you.
Regardless of origin, the term is less frequently used than it was half a century ago. A child enjoined to mind his Ps and Qs might look with confusion on such directions. However, parents might well teach their children the current meaning of the expression. This can prevent children from staring in an unmannerly way at people using the phrase.