Teacher: Where's your homework?
Student: At home...
Teacher: What's it doing there?
Student: Having a better time than me.
Teacher: Where's your homework?
Student: At home...
Teacher: What's it doing there?
Student: Having a better time than me.
Listen up, you simpleton. The student didn't do their homework. When the teacher asks where it is, the student says it's at home. The punchline is that the homework is "having a better time" than the student, implying the student is miserable doing schoolwork.