Once you see a scratch or rust spot, you'll want to do a thorough check. And don't just look at the immediate area, but the whole automobile (this includes areas underneath as well). This way, when you set to work you can take care of everything in one shot.
Scratches. Spot-clean the area using automotive-specific soap and some water, then check the mark's depth. If there's no change in color, but you can feel an indentation, you probably just nicked the clear coat finish. You can fix this problem with car polish. If you see a color change, like a white undercoat or a slightly different surface color, or if you see metal without any corrosion, you chipped the paint coat and will have to do some repainting.
Note: Although small paint chips can be touched up to be almost invisible to the eye, remember that even paint made for your particular model and year isn't guaranteed to match perfectly. The only way to ensure a perfect match is to have the entire panel repainted by a professional--something you'll want to consider if the scratch is particularly large or in a highly visible area. The same holds true if you want to restore a clear coat to a repainted surface.
Rust spots. These fall under two categories: surface rust and penetrating rust. Surface rust means the rust is only on the metal's surface. Once the rust is scraped or ground off, you should see uncorroded metal underneath. It's fairly easy to deal with, since you just have to refill and paint the area.
If the rust has penetrated all the way through the metal, however, you have a bigger problem. This means the section will have to be completely ground away, then replaced. The signs of penetration can be obvious--such as a rusted hole in the metal--or subtler. For example, small rust spots or blistering paint can mean a rust spot on the metal's reverse side is only now coming through to the side you're viewing.
Wheel wells and door sills are particularly prone to this problem, so check them well. To check a door sill, examine the bottom inside area that's enclosed when the door is shut, and look underneath the sill, on the underside of the vehicle. To check a wheel well thoroughly, you'll probably want to remove the tire. Clean the well with soap and water, then check with a flashlight for rust spots.
If the entire penetrated section is small enough--no larger than an inch (2.5 centimeters)--you can probably repair it yourself with body filler. For anything larger, you'll want a professional.