Before written material is set into type, it is to be checked by copy editors. Copy editors correct errors in grammar, spelling, usage and style (in this case, the style refers to a given publication's guidelines for consistency in how words, phrases, typographical elements, etc., are to be used - or not used).
Although proofreading is often a part of the job description, copy editors are not proofreaders. The difference is that proofreaders (a job title that scarcely exists anymore) are charged with simply looking for typographical and mechanical errors on a copy that has already been typeset.
Newspaper copy editors are expected to be fully qualified journalists. It might be less true of copy editors in the other fields. The same as judges are lawyers, astronauts are pilots and FBI agents are cops, newspaper copy editors are reporters first.
A copy editor also is to keep an eye on libel (defamatory untruths that could lead to lawsuits) and errors of fact. Moreover, copy editors must verify facts vary widely. This task is usually considered essential in magazine and book publishing and it is often the job of a separate fact checker, however, sometimes a copy editor does it. In daily newspapers, checking "facts" that appear questionable, assigning editors (the reporters' direct supervisors, who usually edit stories for content and organization before they are sent to the copy desk) and copy editors do not have the time to verify that every name is spelled correctly and every figure is accurate.
Writing can certainly be bad, even when it is "clean", thus, at some publications copy editors might also have the liberty to rewrite. A copy editor's job is to tighten up wordy prose and smooth awkward transitions; nevertheless, a more extensive rewriting usually has to be cleared with an assigning editor or a reporter. It is mainly headlines ("heds") and captions (or "cutlines") that form the "writing" portion of a copy editor's job. Headline writing is an art itself with its own set of intricate rules. A headline writer is charged to "tell the story" in a specified (usually short) space that depends on the number of columns a "hed" must cover and a typeface and point size in which it is being written.
Captions are usually a copy desk's job, but sometimes they are done by a photo desk (and National Geographic actually has an entire department, devoted to them). Cutlines are also an art form. In this case, a balancing act involves describing what is happening in the picture without stating the obvious.
At newspapers, copy editors may be called upon to do "layout" - that is, to design pages. The editorial work also includes making the decision which stories, photos and graphics will run and which of those will be featured most prominently. Frequently, large newspapers generally have separate desks, dealing with national and international news, while smaller newspapers have that only with local news; hence, they use copy editors as "wire editors" to monitor what the news services are reporting from around the globe.
Finally, most copy editors have some sort of typesetting chores. While "Rim" editors (a rank and file) usually have to insert proper typesetting codes for headlines, the "slot" (a supervisor) almost always has to do the actual typesetting, but today it only means hitting a key.