Dialogue's a tricksy beast. You either have it or you don't when writing, but never fear, you can find ways to dandy up what your characters say to each other. Most importantly, your characters' dialogue should flow smoothly. Easier said than done. It's not just two scientists having a long and involved discussion about the spaceship's hyperdrive for the readers' benefit. (AKA the infamous info dump.)
You want what your characters say feel natural. You want your readers to laugh out loud. (A hint, Terry Pratchett is a master of writing awesome dialogue.)
Although dialogue needs to feel real, it also can't slavishly run like the dialogue between real people. (Without getting lynched, see if you can eavesdrop on some conversations held in public. Conversations follow almost set routines... And you don't want to fill your novel with bland "Hello, how are you? type talking).
Your dialogue should always progress your plot in some way, or offer insights into your characters.
Some of my favourite character interchanges are courtesy of The League of Gentlemen or Little Britain.
Then don't forget to look toward the stage for dialogue. One of my favourite plays, Athol Fugard's The Road To Mecca.
A lot is often said by omission, or characters talking at cross purposes to each other. Think of good dialogue as being like a good combat scene, only words are used instead of weapons, and the resulting tension rises from who's going to hit home with that last literary punch.
Things to take into consideration is characters' ages, cultures, backgrounds and social position. How does a schoolteacher address his class when he's peeved about someone having broken a window? How does the naughty kid react to the teacher when he sees him in the store, 20 years after he finished school? Does he revert to his childhood around an old authority figure or does he talk to his erstwhile teacher as an adult?
Then, with dialect, do you or don't you? Trainspotting by Irvine Welsh is written in dialect, which is kinda fun but you'll need to really get into it, and it can detract from the overall experience. Ditto for Anthony Burgess's A Clockwork Orange. You really need to work for that story. My suggestion if you're just starting out is don't complicate your life by writing in dialect just yet.
If you feel like you need to practise a bit, my suggestion is to pull a scene out of your novel (or write a short story) where you specifically deconstruct the relationship between them. What are their motivations? Are their goals in conflict? How do they treat this in their dialogue? What *aren't* they saying to each other? What sort of power play is happening in their dialogue? How do they spar with words?
Don't be afraid to play around and experiment. Then compare how that scene was originally and what's happening now.