Here's a breakdown:
No comma before "and":
* I like apples and oranges.
* She went to the store and bought groceries.
Comma before "and":
* I like apples, oranges, and bananas.
* He went to the store, bought groceries, and cooked dinner.
Exceptions:
* When "and" joins two independent clauses: In this case, a comma is always necessary.
* For clarity: Sometimes a comma is used before "and" even in a series of two items if it helps avoid confusion.
Example:
* "The cat, and the dog, went for a walk." (This comma helps distinguish between the cat and the dog)
Ultimately, the best way to know when to use a comma before "and" is to understand the structure of your sentence and how the word "and" is functioning.