This assumes you want to do the work yourself.
Solution 1: One method that works well on unfinished or stainless steel items with a "brushed" finish (you'll be able to see the "grain" in the finish) is to use a steel brush with fine bristles. I bought mine at a hardware store (it looks something like a toothbrush with steel bristles) and use it when one of my brushed finish stainless guns gets scuff marks on it. It will also remove rust quite handily. Start lightly, brush with the grain and check frequently to make sure you're not doing something you won't like. If there is deep pitting or deep scratches you may have to go to solution 3.
Solution 2: For a bead-blasted stainless finish (matte finish with no grain) you can use 0000 (or maybe even a bit coarser--say 000) steel wool to remove rust, but when you're done, be sure to brush the area off thoroughly with a plastic brush and solvent to remove any small steel wool fragments as they can rust and discolor the surrounding area. Start slowly and watch how things are progressing so you don't do something that's undesirable or hard to undo. It's pretty easy to make the area look much different from the rest of the gun and then you'll have to go to solution 3. Again, if there is significant pitting or deep scratches this is not going to remove it.
Solution 3: If there's a mirror (or very shiny) finish in the damaged area or if the pitting is deep then you're going to have some work to do. (See alternative if that sounds bad or if there's significant damage/rust.***) Using fine grit sandpaper (I'd start with 600 grit or finer--if in doubt go finer first. It's easy to decide that it's too fine and you want to go coarser, but if you go too coarse right off the bat then you've made yourself a lot more work) sand off the rust marks and pitting. If there's deep pitting, you'll be busy for awhile and you may even need to go to a coarser sandpaper--I wouldn't go any coarser than 400 grit. If 400 won't do it, you need professional help. Be sure to sand so that you don't round off corners, don't take off metal except where it's visible and don't remove metal from "working" surfaces. (i.e. don't sand on the locking surfaces of a bolt). When all the rust/scratches are gone go to a finer grit and keep going until it's shiny. I'd probably go 600, 800 & 1000 but you may have to start with 400 if there are deep pits. Then finish with a metal polish like Flitz, following the instructions that come with the polish.
If you take solution 3, you're going to end up with a polished finish regardless of how it looked initially, which means you'll have to polish the entire visible area of the affected part to make it uniform. If it's a large area you've got a LOT of work to do although you'll probably like the effect when you're done.
*** The alternative to solution 3 is to have the gun bead blasted or otherwise professionally refinished.
The key in all of this is to go slowly and check your progress frequently. This kind of work tends to be very rewarding because it's not hard to get pleasing results if you don't rush yourself or get impatient. You can always get a piece of scrap steel and practice on it first if you want to build some confidence before you start on your firearm.