Use commas to separate three or more items in a list: We packed sandwiches, apples, and water. (The comma before and is optional, but stay consistent.)
Use a comma after an introductory word or phrase: After dinner, we played cards. Yes, I can help.
Use a comma before and, but, or, so when they join two complete sentences: I wanted to go, but it was raining. Don't use a comma alone to join two sentences: "I was tired, I went to bed" is a comma splice.