Guitar/Tuning Your Ear
Almost as important as learning how to tune your guitar is learning how to tune your ear. Most people do not have "perfect pitch", which is an umbrella term for anyone who is really accurate at determining or singing notes. Although you can naturally be more or less inclined to hear correct pitches, this is a skill that can be learned, and there are several ways of learning it. However, the truth of the matter is that no one is absolutely "perfect" when it comes to pitch, and indeed, many songs you listen to could be deliberately composed slightly sharp or flat.
Some guitar players prefer their instruments not to be exactly tuned, because it gives some extra texture. Tuning the thinner strings slightly sharp can make chords sound brighter, while tuning thicker strings down slightly can give chords some "bite". Another important reason to learn to tune your ear is that one day you will sit down to jam with someone, and have no tuner available, and you will be forced to tune to one another. This is especially true if you have a band, and you are playing live shows; being able to quickly adjust your instrument can be the difference between a great performance and a terrible one.
Using a Human Voice
If you are in a band, and you have a singer that can never quite hit those notes perfectly, sometimes it is easier to retune your guitar rather than try to retune the singer. Learning to tune your strings to a note someone is singing is a valuable skill, and is surprisingly similar to other regular tuning methods, especially if you can tune to a piano.
First the singer should sing a note, preferably an A or an E, and in the most comfortable range of their singing voice. If they can sing high notes, or different notes on command, it is sometimes easiest to tune each string to the singer, and then quickly do some fine adjustments to make sure the guitar strings are consistent.
Players that have been playing for a long time begin to learn what a chord or interval is "supposed" to sound like. Sometimes this is because a favourite song starts with this chord, or because they always play a particular chord type (like a power chord, major barre chord, etc.).
With this method of tuning, you simply play the appropriate chord, and then adjust your strings until it sounds "right". For example, switching into Drop D tuning is often easy for many people, because the open power chord has a certain tone when it is properly tuned. Power chords are especially easy to tell when they are out of tune, because they contain only two notes.
Chords for Tuning
These are some common chords that players use to tell if their guitar is properly tuned.
The power chord is a useful tool in tuning as well as it mimics the natural overtone series of the guitar. Playing a note and a fifth above it, on a piano for example, will allow you to more precisely tune your instrument.