I think accents are very interesting - they differ in pronunciation and also stress.
I agree.  What do you think is the most common accent?  I like Italian.
and prosody. Although grammar, semantics, vocabulary, and other language characteristics often vary concurrently with accent, the word "accent" may refer specifically to the differences in pronunciation, whereas the word "dialect" encompasses the broader set of linguistic differences. Often "accent" is a subset of "dialect".
History.
As human beings spread out into isolated communities, stresses and peculiarities develop. Over time, they can develop into identifiable accents. In North America, the interaction of people from many ethnic backgrounds
of the morning and say in a distinct Russian accent, "Mr. Tilly you have to teach my class today" and then hang up, leaving Tilly in a panic. Tilly dutifully taught the class without the slightest idea of what Sorokin intended for the day. Tilly also planned to have Sorokin chair his dissertation but every time Sorokin heard Tilly's ideas he would say something like "Very interesting Mr. Tilly but I do think Plato said it better." Tilly failed his preliminary examination at Harvard because he forgot what time it