In this line, Juliet is using a pun. A pun is a form of wordplay that involves the use of words that have multiple meanings or words that sound similar but have different meanings, in order to create a humorous or rhetorical effect.
In this case, Juliet is using the word "comfort" in two different ways. First, she is using it in the literal sense, as in the nurse has provided her with comfort and support. Second, she is using it in the figurative sense, as in the nurse has given her something to ease her troubles or make her feel better. The use of the word "comfort" in two different senses creates a play on words, or a pun.