Plan for your first few minutes on stage, these will be the most important minutes in your act, and the part you should focus on the most. In those few minutes, the audience will have determined if you are funny or not, and you should have found your comfort level with the particular audience.
Avoid being too formulaic. Remember that the delivery is everything. Spend more time thinking about how you will deliver the punchlines and jokes than the content itself. When you start to write, write about what you know. Include funny observations, quirky viewpoints on things, and surprise twists on words. Avoid long set-ups or overly lengthy jokes. Most audiences want instant gratification, so pare down your jokes so they are not overly wordy. If a joke needs too much explaining or justifying, then it isn't funny. Make sure your telling of the joke is concisely descriptive, you want to paint a picture in the audience's mind.
Consider the timing. Five minutes on stage should include 20 to 30 jokes. Only about 400 words of text are needed to fill in five minutes. Remember to build in time to hold for laughs. You will not want to start speaking again while the audience is laughing. Wait for the laughter to die down, and then start speaking again.
Watch lots of comedy shows. Visit comedy clubs or watch some on late night television shows. If you think someone is funny, see what it is about him that makes you laugh. Is it his voice, the observations he makes, or just the way he says things? If you like his style, try to emulate the things that are best about it.
Perform your act in front of trusted friends and videotape yourself performing it. Watch yourself on the video and do it over and over again until it is just right. Let your friends give you feedback on what is funny and what isn't. If they don't "get" your jokes, chances are the audience won't either.