I see a need to add this tip because so many well-written books have errors in this area.
Here are a couple of pictures that show the correct way to punctuate dialogue.
One thing I want to point out is that thoughts need quotations also.
Another important thing is each new speaker gets a new paragraph. This helps the reader not get lost as to who is speaking.
This one explains it very cleary.