Commas allow you to add extra details to a sentence. Whether you put this at the start, middle or end is up to you!
e.g. The spot looked ugly, it was bright red.
In the second case, the commas almost act like brackets. We'll have more on them soon enough!