I found that tuners were being discussed in some other thread so I thought it's best to give this all importanct topic a separate thread of its own...
The hardest and the most inaccurate way to tune your guitar is to do it 'by ear', that is by just trying to tune to the tone you 'remember'. Now, there is just one particular frequency that represents, lets say, a C and no other, not a single Hertz more nor less. So can you back up your memory to remember exactly that pitch? This is hardly recommended for the beginner. To give you an idea, probably some very experienced smiths are able to hit the nail pretty close on the head...
A much better way is to tune to a live reference - the piano, the synth, a tuning fork or a tuning whistle. If you have none of these, your computer's MIDI interface can do this for you. Alternatively, you can use the attached file at the bottom which is a very simple tool to set the guitar to the standard tuning.
This is a lot more accurate than the previous method, yet it relies on your ear - it's you who hear the note on the synth and try to reproduce the same on your strings. And although several studies on the imprecision of the human auditory system have been carried out, with just even a little experience you'll know yourself that even this method leaves you well off what the exact frequency should be. That is, if you're always hankering for absolute perfection like me.
Especially, when you're playing in noisy places or performing in concerts, the reference tuning method will obviously not work well. So the best way is to use - well - guitar tuners! These are dedicated equipment that will help you tune perfectly to just any tuning that you want. And this is also the easiest. The only drawback is that your guitar ought to be able to produce electric signals which these measure and compare to the reference. So they ideally allow you to work with electric or electrified-acoustic guitars only, or otherwise a microphone in front of your acoustic (which again introduces imperfection).
If you don't happen to have the guitar tuner hardware, then use what I do: a guitar tuner software. Here are some guitar tuners I've used and liked:
AP Guitar Tuner (Unlimited Shareware): http://www.cerlsoundgroup.org/cgi-bin/aptuner/ftp/apmain/APTunerInstall207.exe
GuitarFX Box (The tuner is unlimited): http://www.guitar-fxbox.com/fxbox26.zip
There are surely many more, but I like them for their simplicity and also because they are free to use. Use the computer mic if your guitar hasn't an output of its own.