It's a third edition concept which might exist only in a world's history.
Epic magic is an idea which dates to earlier editions of the game, and which isn't available to player characters in fifth edition (yet, at least). However, it is something which canonically existed in many worlds, such as the Forgotten Realms. How it exists or existed in a 5e campaign is largely a matter of setting-specific history.
The general concept of epic magic is that it's a form of magic which is not limited to the level 0-9 range of normal spells. When you wield epic magic, you're weaving the raw components of magic together, in ways which can even exceed the power of ninth level spells.
The idea goes back to Bruce Cordell the 1997 AD&D 2nd edition sourcebook College of Wizardry, which introduced the concept of the Language Primeval or Aleph, a sort of ancient language of magic. Complete understanding of this form allows one to construct words and sentences which have magical effect. The sense is that when you hear legends of wizards of long ago who wielded seemingly godlike levels of power exceeding even ninth level spells, this ancient form of magic is what they were using. It has since become a forgotten lore.
The third edition Epic Level Handbook, not concidentally written in part by Bruce Cordell, revives this idea in the form of epic spells, a form of spellcasting which is not bound by the constraints of spell levels. Epic spells are constructed by combining basic "seeds" or magical concepts. The power of an epic spell is only limited by the caster's skill with magic. Since the Epic Level Handbook allowed characters to exceed 20th level, this allowed players to wield spells of practically unlimited power.
D&D 5th edition doesn't allow player characters to exceed 20th level, so if epic spells existed in the world, it would be generally beyond the ability of anyone to cast. However, in settings with continuity of storyline between editions, such as the Forgotten Realms, epic level magic is something which definitely existed in the past, and has merely become unavailable to modern heroes.
How exactly epic magic appears in any given D&D setting will vary:
- In the Forgotten Realms, powerful spellcasters such as Iyraclea had the power to cast epic spells. (Epic Level Handbook p.303).
- In Eberron, epic spells are known to dragons of Argonessen (Dragons of Eberron p.24).
- In Greyhawk, Mordenkainen knows many epic spells (Epic Level Handbook p.309). A popular fan article considers that the ancient magic which caused the Twin Cataclysms, which destroyed two nations in ancient times, were in fact epic spells.
- Some settings had little or no official D&D third edition support, and so there's no canonical definition for the use of epic spells in that setting (e.g. Dark Sun, Ravenloft, Dragonlance, Spelljammer).