Dialects and accents
Dialect refers to all aspects of language typical for some region: grammar, vocabulary and pronunciation. Accent refers only to pronunciation, just one component of dialect. In fact, there might be several different accents within a dialect region.
Languages typically have regional accents, Southern British English (SBE) being one such regional accent of English. There might additionally be local accents within a region, Cockney and East Anglian being local accents within SBE. Further, within any regional or local variety, there might be socially related accents, sociolects, popular and standard London being sociolects heard in the capital. So far, orthodox sociolinguistics, nothing controversial.
However, the status of national standard accents is a controversial topic among linguists. There are two basic approaches. One is that a national standard accent is somehow the best variety of pronunciation for a language, independent of regional varieties. The other view is that a national standard accent is one of the existing regional accents, one of its sociolects. I tend to side with the latter group, and see the British RP (Received Pronunciation) accent as a sociolect of home counties SBE.
Regional differences and sound change
Regional differences in pronunciation usually arise from sound changes spreading gradually and unevenly across the country, so that different areas get out of phase. For example, words like foot, put, soot, strut, but, putt all rhyme in Northern British English. But not in Southern British English, since a 17th century sound change in the south that split those words into two groups there: (a) foot, put, soot, etc. and (b) strut, but, putt. etc.
A useful tool for comparing accents are the lexical sets that resulted from various dialect developments or sound changes (merging, splitting, shifting etc), leading to the regional differences we hear today. For convenience, sets of words like this are referred to by the keywords used by John Wells (1982, Accents of English, C.U.P.). For example, the two particular sets of words mentioned above are known as the FOOT and STRUT sets, the sound change is the FOOT-STRUT split, and the rhyming vowels of Northern British English are the FOOT vowel and the STRUT vowel.