They are Fred and George Weasley's 'sweet' designed to nake yo uill. They come with an antidote though, so one is take as the lesson is entered, then on the way up to the Hospital Wing, the antidote is taken
'freeing an hour which otherwise would have been spent in futile study' (I think - that was from memory)