Decide whether to produce an original show or a spec, but remember: While original material provides more room for creativity--without having to adhere to plot lines of existing characters, they are rarely picked up by networks, and few writers find their first job using them. As New York-based comedian/writer/copywriter Peter Fogel once wrote, prove that you can actually write in a specific style.
Become familiar with the television show you wish to write for. Understand the distinct voices of the characters and the nature of their interactions, as well as any recurring themes or styles of humor. Show runners--those in charge of a show's writers--want to see a writer's ability to mesh seamlessly with the material they are already producing, so the key is to be fresh without creating an episode that doesn't fit with the show's catalog. The Writers Guild of America suggests researching shows you are interested in to determine what each show's runner might find of interest in seeing prospective material.
Understand proper television script-writing formats, including font, text size, and alignment. Even if the material is funny and entertaining, a script not written in an acceptable format will often mean immediate rejection and might not even be read. Although formatting can be tedious, it is integral to making your work appear professional. Follow the rules as closely as possible, as this can often be the difference between being ignored and being discovered. Check the "Resources" section below for formatting specifics.
Begin writing, keeping in mind proper act structure and appropriate breakpoints. These properties can vary, depending on the show, and must be strictly followed. The goal for writing a spec script is to demonstrate the ability to write the show as it is, not advertise your innovative ideas for the series. When writing original material, more liberties can be taken, but it is still helpful to become familiar with common formats, as any network that purchases your show will have very strict requirements for commercial breaks and other obligations.
Revise your script after you finish your first draft. Read all dialogue aloud, since what appears on paper can often sound much different. Check for any plot inconsistencies or scenes that just do not work. Find others to review your material, preferably those with some experience in the medium. Consider hiring a professional editor or reviser to give you feedback to improve your work, both in general and regarding the specific script they review.
Once you are completely satisfied that your script is the best that it can be, do it all over again and write another one. Almost all agents and producers will require at least two examples of your work, to ensure your ability to consistently create new material, to see your range, and whether you can accurately portray a variety of characters and voices.
Get your script read by sending it to prospective agents as well as studios. While agents are the most common vehicle on your way to getting hired, the Writers Guild of America suggests attempting to have anyone in a position to hire writers exposed to your work. Many writers are hired directly through unsolicited submissions and other means, so exposure is important. Based on your earlier research into shows, It might help to contact someone at the studios or connected to the shows to find out whether they accept unsolicited material--some may simply throw it away, making any contact pointless.