For example:
* I went to the store, and I bought some milk.
* The sky is blue, and the grass is green.
* The dog barked, and the cat ran away.
However, there are some exceptions to this rule. You should not use a comma before and if:
* The two clauses are joined by a coordinating conjunction other than and, such as but, so, or or.
* The two clauses are very short.
* The second clause is a very close restatement of the first.
For example:
* I went to the store but forgot to buy milk.
* The sky is blue and the grass is green.
* The dog barked and ran away.
If you are not sure whether or not to use a comma before and, it is best to err on the side of caution and use the comma.