GRUBguitar, click on search and type "Recording guitar." There are a bunch of threads on recording guitar on this page. Also, type "Recording an electric guitar" in google search engine and a bunch of pages will come up. There will be tons of information.
I'll give you some random notes:
-You should use two mics to record an electric guitar amp. Everyone has their own way, but I generally close mic with an SM57 and put one a few inches back and off the speaker with a condensor.
-You can record in a bathroom to get natural reverb (I've never done this as I hate reveb on guitars)
-You can record in a closet, but you have to deadent he closet and make sure there is nothing shaking inside that will pick up sound.
-You can record in a treated room
-Record with less gain than usual like andyhix said. If you record with too much gain, you will get a muddy, lifeless guitar tone.
-Listen to your amp while you sit in front of it at ground level. That is what the microphones hear, not what you hear standing up near your amp, so adjust accordingly.
-Borrow a great sounding amp, as it will yield much better results than an amp that doesn't sound great.
Hopefully this is enough information to get you thinking. Do some searches. Hopefully someone else will jump in here and clarify what I said and give you other suggestions.