In the play, Dogberry is the chief of the citizen-police in Messina. As is usual in Shakespearean comedy, and Renaissance comedy generally, he is a figure of comic incompetence. The humor of Dogberry's character is his frequent use of malapropism, a technique Shakespeare would use again in Measure for Measure's Elbow. In both plays, Shakespeare appears to be poking mild fun at the amateur police forces of his day, in which respectable citizens spent a fixed number of nights per year fulfilling an obligation to protect the public peace, a job for which they were, by and large, unqualified.
Dogberry and his crew, however, are also given a thematic function, for it is they who (accidentally) uncover the plot of Don John and begin the process of restoration that leads to the play's happy conclusion. In that sense, Dogberry's comic ineptitude is made to serve the sense of a providential force overseeing the fortunate restoral of social and emotional order.
When describing a criminal's offense, Dogberry likes to say it in many different ways as a numbered list out of order. When insulted or derided, he is very malicious about making sure it gets recorded by the Sexton, and when he is called an "ass" after the Sexton leaves, he is so proud of his new title that he becomes extremely boastful, to comic effect.