Rule 1: When you list several things in a sentence, you MUST divide them with commas.
Rule 2:A comma is used just before a little conjunction (and, but, for, nor, or, so, yet) to separate two different clauses or parts of a sentence. Examples: The worm looked yummy, so I ate it. I knew $20 was too much for a gumball, but I really wanted it.
Rule 3: A comma is used to divide the introductory part of a sentence from the rest of the sentence. Examples: Before Clyde goes to bed, he always feeds his pet porcupine. Unfortunately, Gwen had stomach flu the day it rained gumdrops.
A related group of words with a subject and a predicate is called a clause. A clause that makes sense by itself is an independent clause. A clause that does not make sense by itself is a dependent clause. A complex sentence contains an independent clause AND a dependent clause.