It depends on the style guide you are following. Some style guides, such as the Associated Press Stylebook, recommend starting a new line for each new speaker in a dialogue, while others, such as the Chicago Manual of Style, recommend keeping all dialogue in the same paragraph.
AP Stylebook:
> "Hello," she said.
>
> "How are you?" he asked.
>
> "I'm fine, thank you," she replied.
Chicago Manual of Style:
> "Hello," she said. "How are you?"
>
> "I'm fine, thank you," she replied.