A comma (,) separates parts of a sentence so readers can see how they fit together. Commas can separate list items, mark the end of an opening clause, or set off a detail that adds information.

How to recognize it
Look at the structure the comma marks: a list, an opening adverbial clause, a conjunction between complete clauses, or supplementary information.
Examples explained
Example 1
Pack a map, a flashlight, and a battery.
Why it works: Commas separate list items; the last is a serial comma.
Example 2
When the lights returned, we checked the freezer.
Why it works: The comma marks the end of the opening adverbial clause.
Example 3
The lights returned, but the freezer stayed off.
Why it works: A comma and coordinating conjunction join two independent clauses.
Common mix-up
A comma alone normally cannot join two independent clauses in edited prose. Add a conjunction or use a period or semicolon.
Explore more detail and examples
Commas also set off supplementary details: The freezer, which we bought in May, stayed off. The paired commas mark added information about an already identified freezer. Use both commas when the surrounding sentence continues.
Quick check
What is wrong with “The lights returned, the freezer stayed off”?
Reveal the answer and explanation
It is a comma splice. Each side can stand alone. “The lights returned, but the freezer stayed off” repairs it.