The "Middle Ages" or medieval period generally refers to the entire time span between classical antiquity and the modern era in Western history. The Middle Ages lasted approximately AD 500 - 1500, from the fall of the (Western) Roman Empire to the fall of the Byzantine Empire and the discovery and colonization of the New World. The Middle Ages are often partitioned into the Early, High, and Late Middle Ages.
The "Dark Ages" in the context of medieval Europe refers to a period roughly synonymous with the Early Middle Ages, AD 500 - 1000. The centuries immediately following the fall of Rome were marked by barbarian invasions, population decline, and cultural and economic deterioration, hence the "dark" moniker.