Here's a breakdown:
Semicolon (;)
* Separates two independent clauses (complete sentences) that are closely related in meaning.
* Can replace a coordinating conjunction (for, and, nor, but, or, yet, so) when the clauses are closely related.
* Used with conjunctive adverbs (however, therefore, moreover, etc.) to connect independent clauses.
Comma (,)
* Separates items in a list.
* Separates independent clauses when they are joined by a coordinating conjunction.
* Separates introductory phrases and clauses from the main clause.
* Separates nonessential clauses and phrases from the rest of the sentence.
Example:
* Incorrect: I went to the store, I bought some milk.
* Correct: I went to the store; I bought some milk. (Semicolon used to separate closely related independent clauses.)
* Incorrect: I like to eat pizza, but I also like pasta.
* Correct: I like to eat pizza, but I also like pasta. (Comma used correctly with a coordinating conjunction.)
In summary, while a comma and semicolon can sometimes appear similar in usage, they have distinct roles in grammar. Understanding their differences will help you write more clearly and accurately.