It's a question worth asking yourself all the time as you write. Do people really talk like that? There are plenty of moments where, if you're honest with yourself, someone has only really said something in a certain way in order to provide the set-up for a joke.
A stand-out example of this for me was the much un-loved Frank Skinner sit-com Shane. I watched an episode a year or so ago and rather enjoyed it. The only bit that diminished my enjoyment was that Frank Skinner had almost all of the jokes and that everyone else had feed-lines. On top of this, the feed lines didn't always sound right or natural, which telegraphed the fact that a joke was on the way and therefore spoiled the joke (and also made one aware that the whole programme is a conceit, which is not something you want to remind your audience of). Sometimes it's hard to avoid a clunky set-up line, especially when the joke you have in mind is a real cracker. But the skill of the writer is to make the dialogue sound real, or natural, or at least real enough.
When The Office came out, the critics and the industry went wild. Here was 'real' dialogue. This is true. The dialogue did sound real (although let's not forget that the character add times spoke directly to camera, in a documentary, and the they played fairly fast and loose with the docu-format).
The Office was truly brilliant as a non-audience show. (Critics then, bless them, returned to studio sitcoms and slammed them for being contrived or fake or silly, when, as I often say on this blog, the audience do realise it's a contrivance and they're okay with that). The Office, though, had an effect though on other writers, who wanted to write dialogue like the dialogue in The Office, and number of other shows, mostly forgotten, came and went that focussed on awkward silences and ennui. Spaced was another groundbreaking show that inspired another generation of writers, and created 'a way of talking'. Let's not forget Peep Show and The Thick of It.
Likewise, monstrously successful shows like Friends, Frasier and Seinfeld have almost created a 'way of talking' that really trips of the tongue and gives a show a feeling of pace. This is fine - if you're an American writer and writing for American audiences. But sometimes this kind of wise-cracking talking finds it way into British comedy.
The reason I mention this is because one or two shows recently - and the odd movie - have felt very unreal to me because of the dialogue and 'way of talking'. It's as if the writers were writing a show that were designed to sound like other shows. It's impossible to tell whether this is intentional - either because the writer in question is writing that way because he/she thinks the audience will like it, or because he/they likes it and it sounds good, or because he/we don't realise we're doing it.
The example that made me shout at my television the most was a movie on TV called Frequently Asked Questions about Time Travel - directed by a good comedy director and had funny actors in it. But it felt like the script was half-way between Hitchhikers and Hot Fuzz. That sounds like a good place to be - but it was just that and only that. It was only influences. I didn't believe any of the characters, or the set-up - and this was highlighted by the fact that people in real life just don't talk like that. What's more, the Hot Fuzz area is dangerous because it is a movie heavily influenced by other movies.
Screenwriters need to know how real people talk and write concise and characterful dialogue in that style. If you spend your life watching movies and TV, and TV influenced by movies, and movies influenced by TV, you'll end up trapped in an unreal life that doesn't connect with reality. Decent writing is about truth. If there's no ring of truth - in situation, character or dialogue - it's just someone talking cliche's or secondhand speech. If you're doing that, stop writing now and get a part-time job, get married and have a child, go into politics or just do something that isn't about TV.
Grandma's House, Roger and Val Have Just Got In, The Great Outdoors, - three brand new BBC comedies inexplicably premiered over July/August - do not fall into this trap, I'm pleased to say. Nor did Rev earlier this summer. In all those programmes, the characters feel real - like they are based on truth, not based on something based on truth. And truth, not wisecracks or contrived 'sexual chemistry', ultimately, is what keeps people watching.