Accent and dialect are similar as they depend on where you were born or live. The difference is that dialect refers to specific words (or grammar) unique to your geographical location. Accent refers to pronunciation.
Slang are words or phrases considered different from standard or formal speech. Slang can be specific to one area, one social group or one generation.
I hope that helps
accent = a distinctive mode of pronunciation of a language, usually associated with nationality e.g. I'm from China so I speak English with a slight Chinese accent.
slang = informal way of saying certain things. e.g. "Whassup??" for What's up?
dialect = a particular form of language of a specific region
The difference between accent and dialect is that "having an accent" means you have a particular kind of pronunciation for a language. Like for English, you have American accent, English accent, etc. It's the same language but people pronounce words differently. On the other hand dialect can be a completely different language. The local dialect of my hometown in China is very different from standard Chinese. There are additional phrases and characters that don't exist in Mandarin.
"Slang" refers to vocabulary. It means, specifically, a special set of words, or words used with special meanings, and are understood only by people within a group.
"Accent" refers to pronunciation. For example, in the Boston area people pronounce their R's in such a subtle way that it sounds as if they are omitted.
"Dialect" refers to patterns of language, including grammar as well as vocabulary and pronunciation. For example, when someone from Western Pennsylvania says "that needs fixed," they are using standard vocabulary and standard pronunciation, but nonstandard grammar that identifies them as speaking a local dialect.
Slang stands for "shortened language" and there is written as well as spoken slang. It exists in every language. For example in English "gangsta", "ride", "BRB" and etc.
Accent is when person is pronouncing words or sentences in foreign language in same or similar way as he does in his mothertongue. This is why accent is often connected to particular nationality, region or social class. In case of British Accent and American Accent, language is the same, only way things are pronounced are different (with few exceptions).
Dialect on other hand is always connected to particular region and could be best described as "language of particular region" meaning that it can be completely different from official language of the country as well as from other dialects. In Italy every region has its own dialect and not only. Even provinces within one region can have different dialects.
Formation of dialect is strictly connected to historical and cultural background of the area. For example Piedmontese dialect has some french influence in it as the area was ruled by French. In case of Sicilian dialect there are influences of Greek, Arabic and others as there were many foreign rulers as well as strong connections with different countries in the area. Now if Piedmontese and Sicilian would meet and talk to each other in their dialects, they would probably not understand each other at all! Also person who speaks official language usually cannot understand dialect!