Magmortar is an offensive powerhouse, boasting very powerful moves, great coverage, and a good mixed movepool. It's stats are at least above average for the most part, and its ability (Flame Body) assists in keeping away physical attackers due to that risk of a burn.
Let's look at a common set used by Magmortar.
Magmortar@Choice Specs
Modest
252sp.atk/252speed/6sp.def
Fire Blast/Overheat
Thunderbolt
Focus Blast
Hidden Power Ice
Obviously, with Magmortar's base 125 sp.atk, Choice Specs sends it to outer space with Specs. If Swampert wants to come in, it's 2HKO'd by Focus Blast, along with Snorlax. Water non-ground types, barring Lanturn, Ludicolo, and maybe something else, eat Thunderbolt for some big damage. Hidden Power Ice OHKOs Dragons wanting to absorb a Fire Blast, barring the increasing Yache Berry.
Magmortar doesn't stop here. It has the ability to act as a mixed attacker too.
Magmortar@Life Orb/Expert Belt
Mild
252sp.atk/84atk/172speed
Lava Plume/Fire Blast
Thunderbolt
Hidden Power Ice
Cross Chop
Mixed attacking Magmortar serves as a big wall breaker, 2HKOing incoming special walls like Blissey and Snorlax, whilist its special movepool and special attack aren't wasted. The choice of items is pure power vs. Power and survivability. Magmortar will be blasting most things for super effective damage, so Expert Belt is usually a good choice.
Other options are available too. You can use are Focus Punch, but you'll need some really good prediction to use it correctly. Will-o-Wisp can burn incoming non-fire counters, and Toxic can hit an incoming Bulky Water. Mach Punch can be used on the mixed set if you don't need much fighting support, but need priority for things like Weavile or a low health DDTar. You can also opt for Taunt to stop a Blissey from Softboiling or Thunder Waving, usually forcing it out to something that can't take on Magmortar. You could also use Earthquake, but Magmortar can take on the two most common fire types already with its power and coverage. You could try a Countersash lead Magmortar for a surprise KO if you're into that.
Personally, I love Magmortar, although I've never actually used it. It's a force to be reckoned with if your team is paralyzed or you have nothing up to its speed. He's a unique Pokemon with amazing coverage, so he can fill a nifty niche on your team.
To cover it up for Maggy, it's a good underrated Pokemon because it isn't that amazing by itself. It has some good stats, but needs that support to become an absolute terror.