You can use a guitar to play anything from death metal to classical and everything in between. Learning to play guitar is more approachable than many other instruments, once you master a few basics. You, too, can learn how to get started teaching yourself to play.
Identify the parts of the guitar. Whether you're playing an electric or an acoustic guitar, the instrument is essentially wood and metal. Copper-wound strings vibrate to create sound. The wooden body resonates that sound to create the warm tones we associate with a guitar.
The strings run between the headstock of the guitar, where they are affixed to tuning pegs that can be rotated to tighten and slacken them, and the bridge, where they're fixed to the guitar's body. On an acoustic guitar, the strings are fixed to the bridge with removable pegs, and on an electric guitar the strings are generally strung through an eyelet. The neck of the guitar is the long wooden piece of wood, flat on one side (this is called the fretboard) and curved on the other. The fretboard is inlaid with metal frets that demarcate the different notes. An acoustic guitar will have a sound hole in the body where the sound will resonate, while an electric guitar will have as many as three magnetic pickups which will channel the sound through an amplifier.
Hold the guitar correctly. Before you start wailing like Hendrix, make sure you're holding your guitar correctly. If you're right handed, you'll play the guitar by strumming about halfway between the sound hole and the bridge with your right hand and fretting the strings on the neck with your left hand.
To play your guitar, sit up in a straight-backed chair or stool. When you orient the guitar to your body, the smallest string should be pointed toward the ground and the thickest string should be pointed up at the ceiling. Hold the back of the guitar so it touches your stomach and chest and rests on the leg of your strumming/picking hand. The guitar should be held mostly with your leg and by cradling it in your body. Your left hand is used to stabilize the neck and fret the strings. Hold the neck in the V created by your thumb and forefinger. You should be able to smoothly move your left hand up and down the neck without having to hold it up. Even if you hold the guitar correctly, you may experience some discomfort while getting used to playing. Do not become discouraged if your shoulder hurts in addition to your neck, arms and hands. You will eventually get used to it.
Tune the guitar. It's no fun to play a guitar that's not in tune and can lead to some bad habits when you're first starting out. Tuning regularly will also familiarize you with which string and fret combinations correspond with which notes.
Learn the name of each string. From the lowest to highest pitch (thickest to thinnest strings) the strings are named E, A, D, G, B, and E (after the note played when the string is plucked with no fingers touching it). Use a mnemonic to remember this order, such as "Eddie Ate Dynamite, Good Bye Eddie!". Electric tuners are easy to use and very accurate. Hold it to the guitar and pluck the high E. The tuner will tell you if the guitar is "sharp" (too high) or "flat" (too low). Pick each note and tighten the string to make it go higher, or give it some slack to lower it. Make sure the room is quiet when using a tuner because the microphone on the tuner can pick up other sounds. If you cannot afford a tuner, you can also tune your guitar without one by matching each note to the corresponding note on the piano.
Practice fretting the strings. The frets are the metal strips that run perpendicular to the strings that mark each note. To play a note, press your finger down between the metal strips, not on them. To say that you're playing the third fret means that you place your finger on the string in the gap between the second and third fret. Also, make sure your finger is closer to the lower fret to avoid buzzing. Hold the string down firmly so that it only vibrates between your finger and your strumming hand, with the tip of your finger doing the pressing.
Every time you move from one fret to another, the resulting pitch will be half a step higher as you move toward the body and a half step lower as you move toward the headstock. Practice moving up and down the fretboard, pressing the frets and getting a feel for the pressure you need to use to play a note.
Hold the pick. A pick, or plectrum, is a small tear-shaped piece of plastic used for picking out individual notes and strumming the guitar. They're cheap and available at any music retailer. While it's not essential to learn to play guitar with a pick, it's most generally the way to start. Make a fist with your picking hand and your thumb flat on top of your curled fingers. Hold the pick by grasping it perpendicular to your fist between your thumb and index finger, with no more than a few centimeters of the smaller end sticking out of your hand.