Writing dialogue is a lot like talking to yourself. It's really rather easy if you're good at making small talk with you. Let's face it, for most of us, our favorite person is us, so this should not be hard. I've never had to practice writing dialogue, but it would be a fun exercise to see what different things people would say in response to a random situation.
Dialogue is vastly important because it defines the character.
For example, if one character (Jimmy) says, "I want ice cream."
There are very nearly endless possibilities of how someone else could respond.
A small child might say, "Me, too!"
An amorous creeper might say, "I want you."
An indulgent mother might say, "What flavor would you like? We'll get you some as soon as possible."
A frustrated mother might say, "Tough."
A frustrated teacher might say, "Please focus, Jimmy."
A friend might say, "What kind? I want mint chocolate chip with fudge and whipped cream."
A waitress might say, "Try the triple fudge sundae. They're fabulous."
Try it, what would you say?