First and formost , you must remove the rust. Consider it cancer. If you don't get it all you know what happens. Sometimes the repair will entail replacing parts of the panels where they are rusted through. This involves cutting back to solid metal and welding new netal in place. After all this is done you must sand all paint from the immediatly surrounding area before applying the body filler (bondo) in thin layers, sanding slightly between coats. Then shape and sand the filler to the origional contours with progressivly finer sandpaper. Prime. Paint. Buff.
Either that or slap the bondo on, scrape it fairly flat and hit it with a spray can of whatever color is on sale.
It can and is done well every day by professionals who are worth every penny you pay them. It's also done every day by arses who wouldn't know a good paint job if it bit them on the foot, but will charge you just as much as the former if given the chance.
If you decide to try it yourself, remember that a good job takes time and effort. Give it a shot, tho. How much worse can it look than it does with the rust?