Have you ever heard of re-amping? If you play electric guitar or bass, you're probably used to playing them through an amplifier.
And while recording your electric guitar by simply setting up a microphone (such as a Shure SM57 for example) in front of the amp is the typical way to do it, there is a cool trick that can allow you to be more flexible with guitar tones, as well as free you up for experimenting. That trick is called re-amping.
Basically what that means is that you record your electric guitar clean, with no amp, usually through a DI (direct inject, though Wikipedia says: "variously claimed to stand for direct input, direct injection or direct interface) box.
If you really need that amped sound to even play the part like I do, you can use a splitter and have one cable go to the amp and the other to a separate track through the DI box. Then you can send it (the clean guitar part) to an amplifier after it is recorded.
For example let's say you do it the old fashioned way and lay down an electric guitar track by recording the output of the amp. But later you realize you didn't get the right sound from the amp, or you want to try a different setting.
At that point you would have to record the part again with that different setting. But with re-amping, you have a clean signal already recorded and all you have to do is play back that part while sending it (routing it out of the computer or recorder) through a cable that you plug into the guitar amp.
That way you can pick whatever amp sound and settings you like and see what that sounds like. If you don't like that sound, simply dial up another sound and do it again.
I've heard of folks doing all kinds of weird stuff when re-amping, like putting the amp into a bathtub. Hey, whatever works to get that perfect, or even whacky, sound.
Once the clean guitar part is recorded you don't have to actually play the part again. Just keep letting the recording program (or recorder - this technique started well before computer recording) "play" the part while you experiment with different amp settings and locations.
Heck, you don't even need to use a guitar amp. Try plugging the signal into a PA, an effects box, a bass amp, etc. It's all limited by your imagination at this point.
Here is an article on re-amping techniques that should give you even more ideas and "how-tos" here.