This quote is also covered in our free Shakespeare quotes section. Please see the link below for more information.
Mercutio's line is, put simply, a curse on both the Capulet and the Montague families.
Mercutio's curse is because he blames the feud between the Capulets and the Montagues for his death - and he realises that he is dying. Mercutio wishes that a "plague" (a horrible illness) will fall on both of the houses of Capulet and Montague (remember, that, the prologue begins "Two houses, both alike in dignity") because he believes that it is their foolish feud that has brought about his death.
In fact, he's wrong. Mercutio's death is not because of the feud between the households, as much as because the love between Romeo and Juliet. Tybalt challenges Romeo to fight (because Romeo dared to attend the Capulet ball) and, when he refuses (because he has just married a Capulet!), Mercutio steps in. That's why Mercutio dies - the "feud", in this scene at least, doesn't actually cause any of the fighting.
One thing too often overlooked is that Mercutio's curse comes true. Friar John, in his single scene in the play, tells Friar Lawrence that he couldn't deliver a letter because of the "infectious pestilence". It is, in fact, a plague which leads to Romeo not receiving the letter - and therefore brings about the deaths of Romeo and Juliet.
In this famous line the word 'houses' means 'families'.
Mercutio is dying, watched by members of the Montagues and Capulets and says, "A plague on both your families". In other words, "I hope both your families get sick and die." Is he being absolutely serious? That is for you to decide.
In Shakespeare's day there were no effective medicines so there were often epidemic outbreaks of disease (called plagues)