Rust on the gears is pretty easy to take care of, especially the rear cogs. I just spray the cassette with a lube like WD40, and give it a good scrub with a wire-bristle brush to get the gunk off, after that, riding the bike will get the rust off the teeth in quick order.
A lot of the black finished parts like headsets, and the like, especially on lower end bikes can be visually cleaned up by applying some penetrating oil and rubbing vigorously with a shop rag. The rust in most of these cases is a very thin layer, an comes off easily.
Chrome parts can be cleaned up using the aluminum foil and vinegar / water method. This works well, however, anywhere there's a rust 'pit' in chrome, it will polish out to the bare metal, but it takes a lot of elbow grease.
Post a picture of the bike, if you can, and we can give you a better idea of what it will take, and what issues you might run in to.