As far as formating for dialogue is concerned, each line requires its own paragraph. Exactly how you break up your paragraphs is I guess up to you, but the most common way is to leave a blank one line space between them. In most novels, you'll find the start of paragraphs are indented, mainly for space reasons, and you can go with that if you like, but for formating ease - and, most importantly, for ease of reading - simply leaving a space between them is probably easier.
I'll write out a passage of dialogue from the brilliant J.R.R. Tolkien novel, "The Hobbit". I'll convert the indented paragraphs to the blank line paragraphs:
This rapid fire kind of dialogue doesn't require long explanations, other than the "said Bert" variety. Anything else would have ruined the feel he was going for, which was a bit of comedy. But the less rapid fire variety might require a bit more description or explanation, such as, "Whence did the Trolls get them, I wonder," said Thorin, looking at his sword with new interest.
It's not important to always finish every line of dialogue with the, "said Bert" type. You can leave out that description for a couple of lines of dialogue, but the important thing is to never write too much without that, otherwise the reader will almost certainly get lost as to who said what. If there are more than two people in the dialogue, then it's even more important to ensure people don't get lost.
There's other rules to dialogue writing, but that should hopefully cover your question.