Most people are familiar with the New York accent, the Boston accent and the Southern accent. However, the term "accent" really refers only to pronunciation. There are different pronunciations, vocabularies, phrases and grammatical rules that have been documented all over the United States. These are what are known as "dialects." Here's how to distinguish between the two terms.
A dialect is generally considered a mutually intelligible variety of a language. What this means is a dialect is different from a language in that different dialects of the same language can be understood by anyone who speaks the language, while different languages can not be understood by people who don't share a language. Just as most everyone speaks a language, everyone also speaks one dialect or another of that language.
The formation of a dialect begins when people from different language backgrounds come together and learn to speak a common language. The influence of the language backgrounds is what creates a variation on the language that is being learned.
Dialects take time to develop and also require that the group of people live close together while at the same time having some form of isolation from other populations. This isolation can be geographical, political, or religious amongst other forms.
Standard American English can be thought of as the median dialect or what the majority of people in the United States perceive to be the dialect from which all other dialects diverge. The reason people develop the idea that there is a standard dialect is that education and mass media propagate it. That is to say, this is the English we are taught is proper in our high school English classes, it is the way we hear newscasters speak on television and it is usually what we read in the newspaper.
When a person speaks differently, this does not mean that that person has poor grammar, is using sloppy, lazy speech or is any less intelligent than those who speak what is considered Standard American English. That person may sound different because he or she is following the rules of the dialect which do not always coincide with the rules of the language.