Grammar and punctuation aren't always easy. Rules can vary depending on what context you are writing, whether it be for a novel or a newspaper. There are also personal stylistic preferences. Plus you have dialogue, where almost anything goes. And just when you think you have it all figured out, a sly sentence will sneak along that would stump even the savviest Grammar Nazis. But there are general rules that will always apply—or at least if you apply them, you won't be wrong.
There are a ton of free grammar/punctuation quizzes on Grammarbook.com to help. Here are a few: