Scratches. There are many different kinds of scratches, some are easier to deal with than others. Some appear to be scratches, but are actually just paint transfer from whatever post or car rubbed against your vehicle. Try using some paint thinner on a soft rag to see if it will wipe off. I recommend rubbing the paint thinner on a small area first to check and see if it will damage your paint. In most cases it will be fine, but if it is an older car, or has been repainted at some point, there could be trouble. The next type of scratch is a fine scratch. Often these can be buffed out. I recommend an orbital polisher. There are many different polishes out there. Basically you want to start with a cut polish (a polish that has a fine grit in it that “cuts” away a small portion of clear coat.) and end with a finishing polish ( a polish that will get rid of any swirls and fine marks from the cut polish). You may have to repeat these steps a few times. If the scratch is a bit deeper you can try a wet sand. This process is still for a fairly fine scratch, but can have amazing results. Your car has a layer of paint and a layer of clear coat. Many fine scratches are only as deep as the clear coat, and can be wet sanded out. Wet sanding is the process of using 2000 grit sand paper and water to sand out the scratches. You want to err on the side of being to light, as you DO NOT want to sand through the clear coat. This can be tricky, so just do a little bit first and then buff it up with the cut polish. You will have to do a cut polish a fair number of times to get rid of the wet sanding marks. Then use your finishing polish. If you think the scratch is deep and through to the paint or metal (eg. a “keyed” scratched) there is no amazing fixes. You either have to tkae it to a bodyshop to get the panel resprayed or touch it up.
Chips and deep scratches. The main thing for chips and deep scratches is to protect them. Although touching them up often is no miracle cosmetically, it will prolong the life of your car. You do not want to sand them, or scour them in any way. You just want to get a fine tipped brush from a craft store and touch inside the scratch or chip, do not smear over top, it will not blend in. It is a good idea to mix some clear coat in with the paint so it will harden. You can get touch up paint from the parts dept. of your dealership, or a bodyshop might mix you up a little if you ask nicely.
Hopefully this sets you on the right direction. There are more technical points that could be made, but these are the basics.