The verb edit means to prepare writing for publication by correcting, revising, or proofreading. If you write for a newspaper, someone very skilled will edit your work before the public sees it.
Edit can also mean to cut out. If you edit out all the references to Harry Potter from the famous series, you'll be left with much shorter books. Edit likely comes from the noun editor, meaning the person in charge of a final version of a text. You might also hear edit used when referring to video or film. If you edit a television show, for example, you assemble pieces of video or film footage to create a complete program.