What does the typical workflow of a journal look like?
Feel free to edit this answer to improve it, in particular to add other names you know to be used for the individual steps or to extend the maximum typical durations from your experience. The source for the diagram can be found here.

Overview



Initial Check

This step is usually performed by the journal's administrative staff. It may include for example:


Checking for missing or broken files.
Checking compliance with length requirements, if any.
Checking central formatting requirements, e.g., line numbers, if required by the journal.
A plagiarism check.
Excluding manuscripts of very low quality, such as automatic translations or manuscripts with very poor language.


Also known as: technical check, initial QC (AIP), admin checklist (IEEE), Awaiting Editorial Office Processing (ScholarOne), quality check (NPG)

Typical duration: A few workdays.

Editor assignment or invitation

Based on the topic of the manuscript and suggestions by the authors, an editor is assigned to handle the manuscript.
Depending on the journal, the assignment may be done by technical staff, the journal's chief editor, or automatic by submission category or author suggestion.
With some journals, editors are invited and not assigned.

Also known as: with editors (APS), editor assigned (Editorial Manager, AIP), AE assignment (IEEE), assigned to the editor (NPG)

Typical duration: A few workdays to several weeks.

Editorial assessment

The editors decide whether the paper should enter the review process or should be rejected directly, e.g., because it does not fit the journal’s scope or requirements on importance or quality. A rejection at this (or the previous) stage is called desk reject. The paper may also be returned to the authors for reasons other than rejection, such as to request more data or clearer figures prior to formal review.

With revised manuscripts, the editors assess whether the existing reviews have been addressed adequately. If yes, they either proceed with another round of reviews or jump to editorial decision immediately – this mostly depends on the magnitude and nature of the revision.

Also known as: with editors (APS), waiting for potential reviewer assignment (AIP), under review (ScholarOne), assigned to the editor (NPG)

Typical duration: This strongly depends on the journal: With some journals, it is less than a week; with others it may take a month, in particular if several people are involved in the decision or the initial quality hurdle is high.

Peer review

The editor selects a number of potential referees to review the manuscript. Should a referee decline to review or not perform the review in a certain time (as given by the editor or journal), the editor usually has to select a new referee. The main exception to this is if the other referees already provided sufficient reviews at this point.

With revised manuscripts, usually the reviewers from the previous round are selected. The editor may also decide that certain or all reviewers need not see the manuscript again, as their comments have been adequately addressed.

Also known as: with reviewers, with referees, under review, awaiting referee assignment, awaiting referee reports, awaiting reviewer scores (ScholarOne), reviewers assigned, manuscript assigned to peer-reviewer/s (NPG)

The initial selection of referees is usually comprised in the previous step. Some editorial systems give the status as with editors (or similar) if a new referee needs to be assigned and no other referee is currently assigned. Others will show under review regardless.

Typical duration: This strongly depends on the field and journal. It typically ranges from a few weeks to several months, but in some cases (particularly for highly theoretical work where intense proof-checking is expected), it may be as long as one to two years. Moreover, the key factors for the duration of an individual peer-review process are how soon the reviewers perform the review and how many reviewers decline or fail to review the manuscript. Thus, even for a given journal, there is a strong variation of review durations. Some journals give their statistics on this time (or a related one) on their webpage.

Editorial decision

Based on the reviews, the editors decide whether:


The manuscript shall be rejected.
The manuscript needs to be revised by the authors before it can possibly be accepted. If the authors submit a revised manuscript, the workflow is mostly the same as for the initial submission.
The manuscript shall be accepted as it is.
A decision requires further reviews.


Also known as with editors (APS), review completed, required reviews completed (Elsevier Editorial System (EES)), awaiting AE recommendation, awaiting decision (ScholarOne), awaiting EiC decision (IEEE), Editor Decision Started (AIP), Decision Started (NPG).
This may be followed by a short stage denoted decision letter being prepared (or similar).

Typical duration: A few workdays to a week. This may take longer with some journals, in particular if several people are involved in the decision.

Copy editing and typesetting

The article is copy-edited and typeset by the publisher. Occasionally, requests to the authors may occur at this stage, e.g., due to low-quality figures.

For some journals, a pre-copy-editing version of the manuscript will be put online at this point under a category like Just Accepted, with a warning that the current version has not yet been copy-edited and may change further before publication.

Also known as: in production, in press

Typical duration: This mostly depends on the publisher’s backlog – between a few workdays to over a year, roughly correlated with the length of the publication delay (see below).

Final proofreading

The authors are sent the paper’s proofs, i.e., the paper as it is about to be published. If corrections are necessary, it goes back to copy editing and typesetting.

Also known as: proofs with authors, Galley proof

Typical duration: Most journals request proofs to be returned within a certain time, usually between 48 hours and a week (reasons).

Publication

For some journals, particularly newer ones with an online-centric publication model, an article will be published immediately after the previous step has been completed.

Other journals with a more traditional process will queue up the publication for collation into a journal issue with other articles.  The time before this issue is published depends on the size of the journal’s publication backlog and can range anywhere from a few weeks to several years.

Many journals with an issue-based delay provide “online early” access to articles so that they are available to the community before the final issue date.  Articles thus often acquire two publication dates: one for online and one for print publication.

Further reading


IOP Publishing: An introductory guide for authors
IEEE: Peer Review and Decision Process for Authors
The secret lives of manuscripts (American Naturalist)