Because of the mountainous landscape of Japan, many communities were previously unable to maintain contact with each other. As a result, regional dialects (hogen) were developed. An example of hogen can be found in the relationship between Spanish and French. Both are Latin based languages, and can therefore be considered a hogen of Latin. Many Japanese dialects share very many similar features. Due to different regions having difficulty communicating, a common language was developed. The basis of the common language was derived from the Kanto-ben (Tokyo's regional dialect). Recently, a movement has arisen to preserve local dialects as a distinct element of a region's culture.
The two largest dialects in Japan are Tokyo-ben, and Kansai-ben (which encompasses Japan's second largest city, Osaka). A sort of love hate relationship exists between the two dialects, and the two major cities, Osaka and Tokyo. Of course, which ever city one is from is considered the best.
To a foreigner the local hogen is not immediately noticeable. After a while in one place though, even a foreigner will start to pick up the local dialect, and even develop its particular accent. This would be similar to someone from Japan moving to Texas to learn English, and picking up that region's particular accent.
To explore more
about Hogen:
Let's Try Kumamoto
Ben!
Kansai Dialect
Self-study Site
Perceptual Dialect Maps of Japan
Tosaben
English Dictionary
Try to Learn the Kyoto Dialect, Kyo
Kotoba

