Depends on the frame material and how heavy the rust is. Is it a blued steel frame? Stainless? (yes, it can still rust)
If it is light rust on a blued steel frame, 0000 steel wool, soaked in oil and rubbed VERY lightly will usually remove the rust. Same for a stainless firearm but this is going polish the surface if it's a matte stainless finish.
If the rust is heavy and pitted it is going to require more extensive methods, done carefully, and probably a refinish. Lots of variables here that we don't know.
I use mesh patches and a lot of hopes until the spot is gone and only the pit remains. I don't use abrasives.
Then I wipe it down dry and coat it with rem oil and let it dry. The teflon in the remoil will seal it up for good and preven the rust from getting oxygen and growing back.
Sometimes I find it helpful to give it a liberal coating of oil and let it sit for several days. If you try to get all the rust off right away, you might find that you will damage the finish more than if you take it slow.
You can knock off a light rust with a stainless steel scrub pad. Steel wool and/or sandpaper for more. You might have to refinish the frame. I wouldn't use a power tool, unless the work is very labor-intensive. It can be too easy to damage or overwork a frame with a power tool.
000-0000 Bronze wool with Break free (CLP). The Bronze wool will not scratch or remove the blue surface like steel wool can, been using it for years on restorations
Sometimes I find it helpful to give it a liberal coating of oil and let it sit for several days. If you try to get all the rust off right away, you might find that you will damage the finish more than if you take it slow.
Yes . Soak the gun with Liquid Wrench or some similar solvent for a day or two then take steel wool no coarser than #1 grade,( I like 0 best) apply motor oil to both steel wool and gun and rub gently.
It seems paradoxical but I've had better results saving remaining blue with a slightly coarser wool than the 0000 or 000 grades.