Mercutio is making a pun with his tragic wound. During the fight between he and Tybalt, Romeo comes between the two of them and Mercutio is stabbed by Tybalt, which was not his intention. Tybalt is encouraged by his kinsmen to leave quickly and Mercutio goes into his final speech. Mercutio is dying and knows he will soon be in the "grave." He continues to make light of the situation and everyone feels he is just "clowning around" as always and they do not take him seriously. Even when he falls down the steps in the town square and is dead they think he is just fooling around till Romeo lifts the handkerchief and sees the wound in his heart.
Mercutio has just been mortally wounded by Tybalt and knows he is dying. In trying to cover it up, he is still making jokes. His pun is appropriate since he will be dead and in his "grave" tomorrow. The others think he's referring to the meaning of grave as "serious".
Level-headed, sensible, non-romantic Mercutio is engaging in a bit of word play here in Act 3.1,98-99. He knows that he will soon be dead from the wounds inflicted by Tybalt and will indeed be in an actual grave.
The fact that Mercutio has lost his life for someone else's cause ("A plague on both your houses" 100-101) and at the hands of someone whom he considers inferior is doubly ironic for the character ("Zounds, a dog, a rat, a mouse,/a cat, to scratch a man to death" 101-102).