Act 5 scene 1 plays like a standard farce with its focus on mistaken identity. A pedant (a schoolmaster) from Mantua is pretending to be Vincentio to protect himself during his time in Padua because he has been told there is a war going on between the two cities. By this point in the play, he is still committed to the deception. He maintains it even when the real Vincentio appears.
Vincentio and the pedant's reactions create much humor, which the latter insulting the former in humorous ways. For example, when Vincentio asks if the pedant is Lucentio's father, the pedant replies, "Ay sir; so his mother says, if I may believe her," a statement which offends the honor of both Vincentio and his wife. The servant Biondello continues to play along with this deception, and creates a subversive strand of humor. He defies the usual class norms of this society, where masters were perfectly within their rights to beat their servants. Further subversion comes from Tranio dressing up as his own master.
All of these mistaken identities and false claims pile up in this scene. The comedy largely comes from the characters trying to assert who they are or trying to untangle who is who. By the end of the scene, all of this confusion is resolved and social order is re-established.