There are a ton of rules for commas. However, the five listed are the five major usages of commas in daily writings. There are more comma rules than this. If you want to look at the more detailed rules, try the extended rules for commas on the Purdue OWL.
How to insert a comma (,) on your computer:
Simply press the comma button next to the “M” button. It shares the button with the less than symbol (<).
If you have two complete sentences joined by one of the coordinating conjunctions (for, and, nor, but, or, yet, so), you need a comma.
I love to go to the park, but it’s hard to resist the ice cream truck!
I worry about putting on weight, so I try to go to the gym every day.
Put a comma after words that introduce the main point of the sentence:
At the beginning of the trip, Michael told them to buckle their seatbelts.
If you’re going to the store, remember to pick up some milk.
Items in a list
Use commas to separate each item in a list. In MLA, APA, and Chicago style of writing, you need the final (or “Oxford”) comma. In Associated Press (AP) style, you don’t. To be on the safe side, always include the last comma.
John, Rita, James, and Phillip are going ice skating this weekend.
I can’t stand jazz, classical, or hip-hop music.
Use a comma to indicate a direct quote.
“I can’t stand horror films,” James said.
Rita replied, “I don’t know. I kind of like them.”
Extra or Detailed Information
Use commas around information that can be taken out of a sentence without fundamentally changing the sentence’s meaning.
David drove his car, a Toyota Corolla, into the wall.
Alex, a car salesman from Topeka, is a big fan of the Royals.