The previous post did a nice job of explaining the context of the lines. Part of what makes these lines so powerful is that they seek to help bring a sense of focus and proportion to the disproportionate world of Romeo. Throughout the play, Romeo never really sees anything in context. His malaise prior to seeing Juliet, his first encounter with her, and his demeanor throughout the courting process/ infatuation with Juliet are a series of interactions that are disproportionate and out of focus with reality. Mercutio's lines help to bring some level of proportionality and sense of focus to Romeo's life where there is no focus. The ideas of being able to not "whine" about his predicament as well possessing the capacity to accept some conditions of reality as they are are both present in these lines.
In Act 2 Scene 4 of the play 'Romeo and Juliet' by William Shakespeare, the author shows us a group of buddies who have been get fed up with the one who, with Mercutio (the speaker) used to be the life and soul of the party. Howver, he changed. It all happened when he saw that girl Rosaline. Since he saw her, he has lost interest in his friends, hanging out, and probably eating and sleeping too. He got lovesickness because she wouldn't give him what he wanted (her love in return for his.) He withdrew from their company preferring to wallow in his self-pity by himself in a grove of trees outside the city. These lines illustrate the point of change - Romeo made himself who he is by 'art' (practicising) as well as by nature and the sickness is wearing off - he used to work at being fun!
See? This is more fun than sitting around complaining about your girlfriend! Now you're acting like the Romeo we know!
Shakespeare's language is, of course, what is termed "early modern English," and can be difficult for modern Americans. He himself felt that Chaucer was the best writer in England's history, and that it was a shame the language had changed so much that people had a hard time reading his work. Another example of how the more things change, the more they stay the same.
These lines are spoken by Mercutio in Act II, Scene 4 of the play. He is speaking to Romeo when he says them. In the passages before the lines you mention, Mercutio has been goofing around making stupid jokes and teasing Romeo. Romeo sort of complains about that and that is when Mercutio speaks "your" lines.
What they mean is essentially
Isn't this (the joking) better than you whining about love (when Rosaline didn't love Romeo)? Now you're fun. Now you are you again -- you the way you used to be. That's what you've learned to be (by art) and that's what you really are like (by nature).
Here is how I translated this passage in my Romeo and Juliet: A Verse Translation.
"Now isn’t this better than whining for love? You’re sociable again. Now you are Romeo; now you are what you are, shaped by art as well as nature, for this drooling love is like a big, slobbering idiot that runs back and forth looking for a hole to shake his rattle in."
You can read excerpts from my Shakespeare translations at www.fullmeasurepress.com