A dynamic microphone can be placed in front of your amp grill directly in line with the center. This can be placed at varying distances. The closer the mic, the clearer the sound, and you'll record less room resonance.
A dynamic microphone can be placed slightly to the left or right of the speaker. This can produce a more mellow sound. This is used for certain styles of indie rock.
This is the most fool-proof method of recording. Certain speakers have a 1/4-inch "line out" jack. This can be routed directly into your recording device. There will be no room resonance and the signal will be crystal clear.
A combination of "line out to recording device," and "microphone in front of amp" methods can also be used. A clear signal is recorded with some room ambience.