These file extensions are potentially dangerous because they can contain code or execute arbitrary commands. An .exe file is potentially dangerous because it’s a program that can do anything (within the limits of Windows’ User Account Control feature). Media files – like .JPEG images and .MP3 music files – are not dangerous because they can’t contain code.(There have been some cases where a maliciously crafted image or other media file can exploit a vulnerability in a viewer application, but these cases are rare and are patched quickly.)
With that in mind, it’s important to know just what types of files can contain code, scripts, and other potentially dangerous things.