Substantive editing (sometimes called structural or content editing) aims to ensure that the structure, content, language, style and presentation of the document are suitable for its intended purpose and readership.
Copyediting aims to achieve accuracy, clarity and consistency in a document. It does not involve significant rewriting, providing a single authorial voice, or tailoring text to a specific audience—these belong to a substantive edit.
Proofreading (usually called this, but, more accurately, known as verification editing) involves checking that the document is ready to be published. It includes making sure that all elements of the document are included and in the proper order, all amendments have been inserted, the house or other set style has been followed, and all spelling or punctuation errors have been deleted.
All of these levels of edit are essential in producing a high-quality publication, whether on paper or online. They are performed at different times in the publication process, and are not necessarily performed only once.
There is usually some overlap between the three levels and an editor hired to do a copyedit is quite likely to also perform some of the tasks usually associated with a substantive edit.