1. Use a comma with quotations. When the sentence within the quotation either does not finish or does not end with a question mark or an explanation mark, use a comma INSIDE of the last quotation mark to set it off from the "he said" information.
2. Use a comma to set off a name or something used in place of a name in direct address. In other words, if you are talking to someone and call them by either their name or something else, set that off with a comma.
3. Set off additional information added to the end of a sentence -- appositive.
4. Set off "Thanks" as an interjection.