Rewriting is the act of changing, deleting, revising or replacing certain character, plot or story elements within a script (or outline/treatment). It's typically the least enjoyable (or hardest) aspect of screenwriting but usually the most important. If it's a spec script, the writer will be relying on their instincts, plus feedback from their friends, to help them in their rewrite. If it's a commissioned or optioned piece, the writer will be subjected to notes from producers, directors, script editors and various execs - or sometimes anyone with an opinion - which can be illuminating and maddening in equal measure. Writers hate rewriting. They love having rewritten.
The Six Stages of Feedback (with photo dramatisation by Jason Arnopp & James Moran)