Repairing a muffler on a lawn mower really comes down to replacement. There is no effective way to fix a muffler if it is damaged or coming apart. The best thing you can do at that point is to replace it. They are very simple to fix and require just a few tools to do the job. You will want to remove the old one, and take it with you to get a replacement as there are many different sizes and configurations available. You can find a complete selection at most home centers or small engine shops.
Place the slip joint pliers on the muffler behind the body where the pipe threads into the cylinder. If you can't get to it, you may have to remove the shroud on the pull starter or other parts on the mower.
Unscrew the muffler by turning it counterclockwise with the pliers. It may be frozen or corroded to the block. If this is the case, you may need a large pair of locking pliers to grip the muffler.
Take the old muffler to a small engine shop or home center and match it up to get a proper replacement. Make sure the threads are the same, the length of the pipe and assembly are the same and the diameter of the muffler is the same.
Insert the new muffler into the threaded hole in the cylinder of the mower, and tighten it with slip joint pliers. Make sure you put some anti-seize compound on the threads so that it will be easier to remove later if necessary.