Microphone SelectionThe first thing to do before you start recording is to select the microphone you'd like to record with. For acoustic guitar, you can do two different techniques: a single, or mono, microphone technique, or a two-microphone, or stereo, technique. What you do is completely up to you and what resources you have available.
For recording acoustic instruments in the highest quality, you'll want to use a condenser microphone rather than a dynamic microphone. Good condenser microphones for acoustic guitar recording include the Oktava MC012 ($200), Groove Tubes GT55 ($250), or the RODE NT1 ($199). The reason you want a condenser microphone rather than a dynamic microphone is very simple; condenser microphones have much better high frequency reproduction and much better transient response, which you need for acoustic instruments. Dynamic microphones, like the SM57, are great for electric guitar amplifiers which don't need as much transient detail.
Microphone PlacementTake a listen to your acoustic guitar. You'll find that the most low-end build-up is near the sound hole itself; the higher-end buildup will be somewhere around the 12th fret. So let's look at the two types of microphone placement I mentioned earlier.
Single Microphone TechniqueIf using just a single microphone, you'll want to start by placing the microphone at about the 12th fret, about 5 inches back. If that doesn't give you the sound you want, move the mic around; after you record it, you might want to give it extra body by "doubling" the track - recording the same thing again, and hard-panning both left and right.
When using a one-microphone technique, you might find that your guitar sounds lifeless and dull. This is generally fine if you're going to be mixed into a mix with many other elements in stereo, but should be avoided when the acoustic guitar is the primary focus of the mix.
Two-Microphone (Stereo) TechniquesIf you have two microphones at your disposal, put one around the 12th fret, and another around the bridge. Hard pan them left and right in your recording software, and record. You should discover that it's got a much more natural and open tone; this is really easy to explain: you have two ears, so when recording with two microphones, it sounds more natural to our brain. You can also try an X/Y configuration at around the 12th fret: place the microphones so that their capsules are on top of each other at a 90 degree angle, facing the guitar. Pan left/right, and you'll find that this gives you a more natural stereo image sometimes.
Using The PickupYou might want to experiment using the built-in pickup as well, if you've got the inputs to do it. Sometimes taking the acoustic guitar's pickup and blending it with microphones can yield a more detailed sound; however, it's totally up to you, and in most cases, unless it's a good quality pickup, it'll sound out of place on a studio recording. Remember to experiment. Each situation will be different, and if you don't have any microphones to record with, a pickup will do fine.
Mixing Acoustic GuitarIf you're mixing acoustic guitar into a full-band song with other guitars, especially if those guitars are in stereo, you might be better off with a single-mic technique, because a stereo acoustic guitar might introduce too much sonic information into the mix and cause it to become cluttered. If it's just you playing guitar and vocals, a stereo or doubled mono technique will sound the best.
Compressing acoustic guitar is subjecting; a lot of engineers will go both ways. I personally hardly ever compress acoustic guitar, but a lot of engineers do. If you chose to compress, try to very lightly compress it - a ratio of 2:1 or so should do the trick. The acoustic guitar itself is very dynamic, and you don't want to ruin that.
Remember, any of these techniques can apply to other acoustic instruments, too!