To write a parody, take a piece of literature or theater and rework it so it's ridiculously overly-exaggerated to make it funny. Parodies are a protected form of entertainment that don't infringe on the copyright protection of the original work.
Familiarize yourself with the work you want to parody. You'll need to be very familiar with it so you can take situations and make them more extreme and take important conversations or actions to make them funny or create misunderstandings.
Create the characters for your parody. The characters should be made up of the most outlandish aspects of the original character's personality traits.
Name each character something similar to the original characters and make it funny if you can. For example, you could change Dr. Doolittle's name to Dr. Doesnothing.
Examine the turning points of the story and make them funny. Set up deliberate misunderstandings, exaggerate the emotions behind the scene and make your characters act as outrageously as possible. Let them say and do all the inappropriate things you can never do in real life.
Rework each section of the book or play, plot point by plot point. You'll want the results to be the same as they are in the book, but create as many funny and bizarre ways for your characters to get there as you can.
Give the final draft of the parody you've written to someone you trust to read and critique. Keep in mind this person also needs to be very familiar with the original work.
Polish your final draft, check for grammar and spelling and begin the process of distribution, through your own sources or by hiring a publisher.
Read parodies of books and watch parodies of movies to get a good understanding of this unique art form.