Harry Marks gives some advice on writing dialogue in fiction:
“Dialogue isn’t easy to write well. It takes time and practice and above all else, the ability to listen. Also, it helps if you don’t feel like a creep for eavesdropping on the people around you.”