Yeah, that's Hermione Granger spanking Emma Watson, the actress. Why? I had the thought, and couldn't resist.
Emma Watson's great, but I think artists tend to draw too much from the films and not use their imaginations a bit. For one thing, Hermione Granger is a nerd. She had big buck teeth and braces for the first four books. So, book Hermione is punishing the Hollywood version of Hermione for changing her image.
The reason Hermione is so happy is she's in class raising her hand to answer a teacher's question as usual. She can multi-task.