In early 2001, I was e-mailed for help by someone who wanted to start to playing electric guitar (specifically, Heavy Metal and Hard Rock). I'm not sure why he asked me (I'm hardly an expert on how to play guitar), but here's what I told him, in edited/revised form:
The best advice I can give is to make sure your electric guitar feels good to your hands and doesn't fight you. If you don't have one yet, try out as many different types as possible. Pay attention to the feel of the guitar's neck, and to its scale length (the distance between the nut and the bridge): 22 1/2" (all Fender Musicmasters/Duo-Sonics before mid-'64), 24" (Fender Jaguar; most Mustangs/Musicmasters/Duo-Sonics after mid-'64), 24 3/4" (almost all Gibsons/Epiphones), 25" (Paul Reed Smith, some Danelectro), or 25 1/2" (Fender Strat/Tele/Jazzmaster; most Ibanez). A couple of inches difference may not seem like much, but (for example) a Mustang will probably feel cramped if you have larger hands. For rock and metal, you probably want a guitar that has a humbucker in the bridge position, but let your ears tell you what you like. If a guitar is used, are the frets badly worn or in need of dressing? (If it needs a complete refret, add another $200-$350 to its cost.) If it's new or used, is it set up/intonated properly? In summary, a good starter guitar can be had for $100-$200 new, but don't skimp. My first guitar cost me $5 used; it was so horrible (badly worn frets, poor intonation, defective wiring) that my development and enthusiasm for guitar playing was retarded by more than 8 years. If you're not sure about things like intonation, ask a guitar repair shop or someone you know and trust to help you out. A basic setup job should cost no more than $50 plus strings, but there are many rip off shops out there.
Secondly, make sure your other equipment is adequate. The best investment you can make is a good tuner (the needle-display quartz tuners are fine), so you can develop your ear to recognize notes and chords. If you're jamming to a record or CD, be aware that they may not play in the tuning you use. Had I known then that Randy Rhoads and SRV always tuned down half a step, or that Tony Iommi sometimes tuned down to C#, I'd have saved myself a lot of frustration. In addition, a small practice amp with distortion will help a lot (especially at first), because distortion helps hide mistakes (and makes mistakes sound cool). You should always keep your fretboard (and strings) clean, as dirt will affect how well you sound and play. Unless you're playing a guitar with a nitrocellulose lacquer-finished fretboard (i.e., a Fender or Gibson made before ~1975), rubbing alcohol and a cotton cloth will help clean guitar strings. Try not to get any on bare wood or the guitar's finish, though.
Finally, learn how to play "power" chord shapes based on the low-E string and the A-string. You can B.S. your way thru 90% of all rock and metal songs by using power chords. The various guitar magazines can be very instructive/informative too. As your ear gets better, try jamming along to records/CDs. Short of joining a band (try to join a band where everyone starts out at about the same skill level on their instrument), that's the best way to learn how to play songs, as opposed to just screwing around.