When you rewrite something, you start from scratch, writing it again to improve it. You might decide to rewrite a poem after your entire poetry class seems confused by your original version.
A newspaper editor might instruct a reporter to rewrite her story, approaching it from a new angle or including more interviews. To rewrite something is to edit it, but the word implies making significant changes — or even starting all over again with a blank piece of paper or computer screen. You can call the new version itself a rewrite too. In journalism, it was once common for a "rewrite man" to work crafting new stories out of other people's reporting.