It's a humorous poem about the dreaded school nurse visit and the anxiety of getting your head checked for head lice. It begins with the lines you mentioned:
> Lining up to see the nurse, and in my opinion there is nothing worse,
> It's a thing I always dread, supposing I've got nits in my head.
If you'd like to read the full poem, you can find it online on various websites, including poetry websites like Poetry Foundation and PoetrySoup, or by searching for "The Head" by Jenny Joseph on Google.