Why do people in different areas speak differently? Where do accents come from, how do they change and/or survive over time and why do we have them?
Reading recommendations on this topic would be welcome.
What do we mean by "dialect"?
First of all, let me say that the distinction between "dialect", "slang", and "language" is fuzzy, arbitrary, and fundamentally a social (cultural, political) construct.
Two dialects of the same language can be mutually unintelligible (e.g. Moroccan and Baghdadi Arabic — significantly different on every level), while two separate languages can be almost 100% understandable (e.g. Serbian and Croatian — considered different for nationalistic reasons by some). You can also have a language continuum; for example, Dutch and German are completely different languages. If you start out in northern Germany, and start heading (along the correct path) from town to town, you'll find that each neighboring town understands each other, but once you are in the middle of the Netherlands, you'll realize that people are now speaking dialects of Dutch, and at some point you crossed over from one to another, but there was never a line where one group is speaking German and the other speaks Dutch.
Defining what a "language" is in real terms
A good way to think about why we have dialects and accents is if you don't think about a language as a single entity of some kind. Each official "language" is more of an abstract concept. Instead, you can think of language as a distributed system, where no member of the system (any speaker of the language) has complete knowledge of the system. Those members who come in contact with each other influence each other as they communicate and interact, meaning that there is bi-directional feedback between members. Due to things like innovation, misunderstandings, reanalysis, and borrowing, random elements enter into the system and drive change. Also, the population is always adding new members who are more malleable and losing older members.
The more isolated and coherent a group of people are, the more these types of variation lead to deviation in the form of the language, because the repeated interaction with members having similar grammar leads to a sort of feedback loop. (You can think of this as being somewhat analogous to isolated groups of people having genetic defects or features in common, because the repeated combining of similar DNA amplifies subtle mutations.)
This is happening all at the same time, with "group of people" being defined at all levels, and all updating and influencing each other at the same time. For example, each person has his own way of speaking, and households will often develop unique features in the way they speak. Different age groups, genders, and other culturally defined groups may have their own features as well. People's grammars are being influenced by their peers and, in turn, influencing their peers.
Looking at language in this way, it makes perfect sense that we would have all sorts of variation.
So, the real reason why we have dialects is actually because we arbitrarily choose one version of a language and deem that "the language", making every deviation from this official version a de facto dialect. In reality, we are a huge system of varying idiolects with varying levels of coherence.
Differences in language change today
There are certain things that drive a language towards greater and broader coherence nowadays. The biggest is education and a writing system. With everyone learning standard English in school, and a standard writing system, we maintain some connection to a certain version of a language that changes much more slowly and conservatively.
Another major factor that maintains widespread language coherence is media: books, radio, TV, Internet. On television, we hear a variety of different accents, and above all others, a "dialect-free" version of English. We can read books, webpages, and listen to the radio, and all of these things impact our own internal version of language.
For these reasons, language change in English might take a different form than it had for its entire existence until 100-200 years ago. It may be slower to change in certain ways, and faster in others, dialects may merge, or any number of other things.
With one or two artificial exceptions, languages are not made, they are grown. More, they are grown by the simple mechanism of usage. Languages are never set in stone, but are living things that change as people use them. The most simple and glaring example today is the 'Americanization' of, basically, all the languages in the world by the mechanism of mass media, internet, and high tech. The most common word in the world is 'OK', a piece of American slang from WW1 (the latest theory, Some say it's American pre-WW1). Today, it may be that every single person in the world who can speak a modern language knows what 'ok' means.
But 'television' is also widespread. 'Hamburger' is the same in most languages (given pronunciation difficulties, like in Japan) on and on. Thus, American English is being spread everywhere by the mechanism of simple contact. It's not a conspiracy, it's a function of the elastic nature of language and its easy ability to be influenced.
This is also true for accents. All isolated or semi-isolated groups of a certain size have accents (as well as dialects) due to a natural evolutionary process - ('mutations' are spread by usage). It starts with one person saying 'oo' instead of 'ow' for words that have an 'ou' in them, (e.g. out, about, flout, trout...) it spreads to two, then more, and before you know it, Canada is created ;-) . (For those who don't know, Canadian English and American English are all but identical except that Canadians say 'oo' and Americans say 'ow' when they speak a word with 'ou' in it.)
There are unifying factors as to language such as the printed media and there are diversifying factors. Distant groups of speakers, not in constant contact with the main group of speakers, quickly develop their own way of speaking. But the main factor of differences probably is that there are different ethic groups that have their individual habits of speech.
as far as the language is concerned every language has its dialects this is because people from different places come together in one certain place and interact as such through their utturance they be able to form one understandable language.