A copy editor will check the author's text for consistency and correctness, covering spelling, grammar, word choice, sentence structure, layout on the page and internal logic. I may not be an expert in your subject, but I can still tell when the word 'not' has disappeared from a sentence!
Writers are extremely close to their work and start reading what they meant to write, not what's there on the page. Copy editors come in and clean that up, always sensitive to the writer's style and intention, of course. Problems are referred to the author and then those corrections incorporated into the text prior to typesetting.
For a work that's about to be published, the copy editor also ensures that the document conforms to the publisher's house style and is correctly formatted and tagged for the typesetter.
On the other hand, proofreading happens when a document to be published has been typeset and the proofs (the first attempt at the finished printed pages) produced. The proofreader is checking that the typesetter hasn't introduced any new blunders, but is also the last line of defence against spelling, grammar and layout mistakes. The proofreader may even identify bigger problems if everyone involved in the text so far has missed them (for example, our hero's big blue eyes may turn brown for a few pages. It's been known to happen!).