Know your audience. To be the funniest in school, you have to know what your classmates find funny! Listen to them and see what makes them chuckle. Do they lose their cool when you make fun of your teachers? When you make fun of yourself? How about physical comedy? Or do they prefer jokes that make references to TV shows, comedians, and all of pop culture?
And even within your group of friends, different people are going to find different things funny. Try to take note of each of your close friends' tastes. How are they different?
Know how to handle your teachers, too. If you were assigned to write a variation of the famous "to be or not to be" speech from Hamlet and you go up and recite the lyrics to "Should I Stay or Should I Go?" by the Clash, some teachers may find it hilarious. Others? Not so much.