Electric guitar is one of the most distinctive instruments there is, but what most punters think is he sound of an electric guitar is actually the sound of the amplification and processing of a very pedestrian sound.
Plug an electric guitar directly into your soundcard input and it will sound much like a normal guitar, only slightly more 'electric'. Recent years might have brought emulations of classic gear into the software-based home studio, but there's still every need to know how to record the real deal.
Because guitar amps generally have no tweeters, they aren't so sparkly in the high-end, meaning that a wide range of mics are potentially applicable. American producers tend to favour condenser mics for a more open sound, while in the UK producers generally prefer dynamic mics for a fuller sound with rounded highs. In practice though, the thing that most influences tonality is mic placement.
While most of the sound of a guitar amp comes from the speaker at the front, the cabinet itself will also have a quality of its own. Depending on whether it's a closed or open backed model, the vibrations will ricochet around inside and shake the whole construction. These effects might not be apparent from a few feet away, but lower the volume, get on all fours and put your ear right in front of it, moving around the front and sides, and you'll get an idea of the subtleties your mic can pick up. With open backed amps, you might even try using a mic at the back for a warmer sound. Some engineers like to use an ambience mic a few feet from the cabinet, as with drum recording.
DI and emulation
If the thought of trying to mic up amps doesn't float your boat, you're not alone. They're expensive, large and incredibly unpopular with neighbours (as many of the best don't actually sound good until you crank them up to 11). Fortunately, there are now plenty of digital substitutes available, many of which sound so good that they're almost indistinguishable from the originals. The only drawback is that some such devices introduce latency, particularly those based purely in software. For most styles you can simply record dry signals, but it's impossible to play a big, distorted solo convincingly unless you can actually hear the effect in action as you play. For basic play, such latency won't cause too much trouble. But if you want to play tricky solos, you might prefer an external model such as the acclaimed Pod range from Line 6. The basic models only offer one output, so to monitor direct and record you'll need to run the signal through a splitter, which will introduce slight signal degradation. Larger models feature two outputs, though, and some even offer digital connections.
Take it slow
One of the greatest things about modern digital recording is that you can coax out performances that just weren't possible before. Just as MIDI made everybody a rock-solid pianist by enabling us to record performances at slow tempo, now you can do the same thing with audio. If you're struggling to fine-tune that killer solo, or only seem to manage one or two sections at a time, don't worry. Try slowing the tempo down (if you're using a sequencer that doesn't auto-stretch audio then you'll need to mute everything else while you do this) and record the same solo at a slower tempo. You can then simply speed up the resulting solo until it fits the project tempo. And if there are any mistakes, just patch together the best bits of the different takes.
If you're using a DI system with emulation plug-ins (or if your guitarist is in a different room to the amp), you can set up a mic to record the actual sound of the strings being plucked on the electric guitar and mix them with the main signal.
If the sound of your guitar is too harsh, try moving the mic towards the side of the amp.
You can get some useful variations by raising the amp off the ground and keeping the mic in the same relative position.
Electric guitars and all peripherals are incredibly noisy. To remove some unwanted hiss, try some noise reduction plug-ins. Alternatively, insert a high-cut filter very early in the chain; just enough to remove hiss without altering the tone. The sharper the filter, the better - 24dB per octave is ideal.