If the language you speak in your region is different in vocabulary, grammar and accent than the main form of the language, you speak a dialect. If your cousin in rural Arkansas can't understand your jokes, blame it on differences in dialect.
Both an accent and a dialect contain variations in pronunciation from the standard form of a language. When you speak a dialect, however, you also use different words and grammar, sometimes to such a degree that speakers of the dialect and the standard form of the language have a hard time understanding each other.