Dormammu is a demonic entity that rules over the Dark Dimension. He wields great magical powers. He has already conquered several other realms, and imprisoned their inhabitants in the Dark Dimension. Most of the time, he appears as a giant, living flame, but he can assume a physical form resembling that of his Earth-616 counterpart when needed.
When Loki and Professor Akatsuki ended up in the Dark Dimension after Loki’s fight with the Avengers at his Ice Palace, Dormammu recruited both of them to be his servants. He turned Professor Akatsuki into the villain Ronin, and ordered Loki to find a way to open a gate to Earth large enough for him to pass through so he could conquer the Earth and add it to his realm. For this, Loki had his henchmen, the Celebrity Five collect the Treasures of Darkness and use them to powerup a device called the Dark Gate.
When Tony Stark was accidently infected by the dark energy from the Dimension Sphere while fighting Ronin, he began to see visions of the Dark Dimension, including a silhouette of Dormammu.. Eventually, the energy caused Tony to fall into a coma and send his conscious mind to the Dark Dimension. There, Tony first met Dormammu and learned of the demons’ plan. Dormammu intended to make Tony Stark into one of his servants as well, but fortunately Tony was saved in time by Dr. Strange and thus able to warn his fellow Avengers of Dormammu’s plan.
Unfortunately, the Avengers were unable to prevent the Dark Gate from being activated. Once the gate was open. Dormammu began his descent upon Earth by dragging the Celebrity Five into the Dark Dimension. He attempted to do the same thing with Akira, Hikaru, Ronin Thor and Iron Man. Due to Akira attempting to save him, Professor Akatsuki was able to overcome his Ronin persona and he destroyed the Dark Gate, closing the portal. However, by this time enough Dark Energy had already been unleashed upon Earth for Dormammu to re-open the gate from within the Dark Dimension.
With the gate now open, Dormammu's next move was to plunge the population of Earth into deep despair, which would fuel Dormammu himself and allow him to unleash his full power on Earth. He uses a powerfull illusion to briefly turn the entire Earth into an apocalyptic wasteland, and demanded the Avengers' souls as a sacrifice for Earth to be spared this fate. The World Security Council was actually willing to give in to this demand, but fortunately for the Avengers, Nick Fury was not. Instead, Fury ordered S.H.I.E.L.D. to cooperate with the Avengers to use the Kree Mact to create a weapon capable of defeating Dormammu and destroy the gate to the Dark Dimension.
When Dormammu learned of this plan, he unleashed an assault on the helicarrier, sending a squadron of Mindless Ones to attack the craft. The first attack was repelled by all the heroes on board. However, Loki had used the opportunity to sneak onboard the Helicarrier and start a second attack from within by first sawing despair among the crew by telling lies about the new weapon being unsafe, and then release a second squadron of Mindless Ones. When Loki's plan was exposed, this second attack was also repelled. Out of other options, Dormammu assumed his physical form and left the Dark Dimension to personally attack the Helicarrier. S.H.I.E.L.D. was ready for him and deployed the new weapons; 10 giant cannons powered by the Kree Mact. The plan worked; the force of all 10 cannons combined destroyed the gate and severely weakened Dormammu. Loki seized this opportunity to rebel against his master, and D-Secure him in a DISK.
Loki then used a portable version of the DISK power absorption system to absorb Dormammu's powers for himself, becomming immensely powerful. This was negated however when the fight between the Avengers and Loki was broadcasted all around the world, restoring everybody's hope and thus weakening Dormammu's powers. Eventually, Loki was defeated and D-Secured as well. It's unknown what happened to Dormammu and his DISK afterward.
Due to his powers being fueled by despair, a lack of this emotion can weaken him, and an abundance of hope (despair's polar opposite) can completely negate his powers.