Question: when to use a comma?
Answer: Use commas to separate independent clauses when they are joined by any of these seven coordinating conjunctions: and, but, for, or, nor, so, yet. ... 
Use commas after introductory a) clauses, b) phrases, or c) words that come before the main clause.