Recording Electric Guitar
Now that you can put the sound of your guitar pickups through virtual guitar amplifiers and speakers in your computer studio software you'd think there'd be no need to bother mic'ing up the sound of your own guitar combo or amp' and speaker stack. However even though software modelling is impressive it's just a snapshot of distortion taken at one moment in time, it's not like a movie showing how your amplifier and speaker(s) timbre changes over time. Also you spent time and money getting the right amp' and speakers to achieve your 'sound' and that combination might not be available in software. The subtle or not so subtle changes of distortion in the electronics and speakers, from the initial loud attack (most distortion) through to the fading away sound (subtle distortion) need to be recorded with a microphone.
When recording electric guitar it's worth recording the direct signal of the guitar onto one track and the microphone onto another track, that way you can send the direct signal out to an amplifier again later on if you decide that you want a different sound i.e. more or less distortion, a different tone or using built in effects such as spring reverb or you may want the microphone(s) to be in a different place.
If you know you want to "re-amp" later then you could mic' up the strings of your electric guitar instead while monitoring a close approximation of the distortion you want through the virtual effects such as Amp Designer in Apple's Logic Pro, Native Instrument's Guitar Rig Pro and IK Multimedia's Amplitube. Although they're not very loud, the sound of the plectrum on strings can be added at the mix to give a different percussive quality to the sound, so don't be afraid to experiment.
Microphone Placement for Recording Electric Guitar
Whether you have just one speaker e.g. the original Vox AC30 combo, two speakers such as the Fender Twin Reverb combo or many speakers e.g. Marshall cabs with four 12" speakers attached to a separate amp' it's best to start with mic'ing up just one speaker fairly closely e.g. six inches away. Generally the microphone is pointed at the speaker cone in the middle for the brightest sound or offset halfway between the centre and edge of the speaker if that is too harsh.
Just as with an acoustic guitar, the further you get away from the sound generator the more you get of the overall sound of the instrument, so backing off the microphone in this instance will get more of the sound of the cabinet and if you have more than one speaker this will be even more noticeable. Experiment with moving the microphone around to get the sound you hear and like in the room.
If you have a selection of microphones then you can have a combination of one or more close microphones plus more distant 'ambient' microphones several metres (or further) away to record the sound of the room. Avoid pointing the ambient mic(s) at the speakers, remember you're after the sound of the room plus you are more likely to get out of phase problems between the close and ambient mic's when they're both 'looking' at the speaker(s). If you have enough tracks available record each mic' separately to give you greater flexibility at the mixing stage, if not you'll have to pre-mix them at the recording stage. Either way it's a good idea to listen to all the close mic's in mono to make sure you haven't got any out of phase elements (the sound is thin and lacking in bass). If you have you'll have to move one of the close mic's an inch at a time. Of course it could be that your speakers aren't wired in phase.
One other thing to be aware of is good suspension of the microphone(s) to avoid structural borne sound vibrations from the speaker cabinet through the floor to the mic' stand. A banquet stand with a rubber base or a suspension mount for the mic' itself should sort that. If there's still some rumble evident then put some bass cut in a condenser mic or at the mixer or channel strip with dynamic and ribbon microphones.
Microphone Choice for Guitar Recording
There are no hard and fast rules about which type of microphone to use when recording electric guitar combos and speaker stacks. The frequency response of speakers is deliberately restricted at the top end to remove all the nasty unpleasant higher frequency non harmonic distortion artefacts to leave just the lower frequency harmonic distortion we do like. So that doesn't rule out using Dynamic and Ribbon microphones.
Dynamic microphones are often used such as the Shure SM57, Electrovoice RE20 and Sennheiser MD421 especially if it's for live sound because they're rugged and can cope with the high sound pressure levels coming from a speaker just inches away. Dynamic mic' capsules don't move as quickly as condenser mic's which means that they soften the initial attack or transients of notes, this can be a positive as it helps to even out the volume and make it sit in the mix better. If you're also recording the ambience of the room it would be better to use a condenser mic' due to it's higher sensitivity and lower noise figures.
Condenser mic's e.g. AKG C414B XLS, Neumann U87 and Sennheiser MKH40 will almost certainly need a 'pad' switching in to stop the pre-amplifier from distorting if you're close mic'ing the speaker, but not if you're using it to do ambient recording. Because the frequency response of the speaker(s) is limited you don't really need the extended frequency response of a condenser mic' but it's sensitivity will be useful for ambient recording.
Ribbon microphones e.g. Coles 4038, Royer 122, Beyer Dynamic M160 are experiencing a resurgence in popularity, however their fragile nature means that they require greater care, so they're best used in the studio but not in a touring situation on the road. A windshield is a must if you are using it close to the speaker(s) as the blast of air from a very loud system could literally tear the ribbon out of its mounting. They can be used for ambient mic'ing as well, however they're not as sensitive as condenser microphones and will therefore need a very high quality pre-amplifier capable of adding enough gain without adding electronic noise (hiss).
Summary
Each sound engineer develops his or her own technique(s) and microphone choice for recording electric guitar and some engineers are employed specifically because they have developed a 'sound' that guitarists want. There is plenty of scope for experimentation, so take some time out to achieve your signature guitar sound if that's what you want or equally experiment to achieve a different sound on each track you do.