Most guitarists, at some point, learn how to tune a guitar using the "5th fret method", where you essentially tune a guitar to itself (known as relative tuning). It's one of the two main relative tuning methods, the other being harmonic tuning.
This is perfect for when you don't have access to an electronic tuner or any other absolute pitch reference (e.g. a piano to tune your guitar to) and you're maybe just playing alone or with a vocalist.
If you are just casually playing alone, the individual strings don't need to be absolutely tuned to their desired notes (E A D G B e). As long as they are tuned relatively, collectively to each other, your music will sound in tune.
Follow the steps below on how to tune a guitar quickly using this method...
Relative Tuning Using the 5th Fret Method
Start with the 6th (lowest/fattest) string. This will be your base reference for tuning the other strings.
Again, it doesn't matter if the low E is in fact closer to an E flat, because the other strings will be tuned in relation to whatever note that low string is.
1) Fret the low E string at the 5th fret
2) Still fretting the low E string, play the open A (5th) string above it and compare the two notes:

If the open A string sounds lower than the 5th fret E string, tune it up until the notes match...
If the open A string sounds higher than the 5th fret E string, first tune it down lower, then tune it up until it sounds exactly the same note...
Tuning up ensures the string's tension is locked and will therefore stay in tune longer.
Repeat the same process, but this time with the A string at the 5th fret and the D string open - tune the D up or down until it matches the fretted A string...

Repeat the same process, but with the D string at the 5th fret and the G string open - tune the G up or down until it matches the fretted D...

Next, things change slightly, because the tuning interval between the G and B string is different.
Instead of tuning to the 5th fret, fret the G string at the 4th fret. Then just follow the same process of tuning the open B string up or down until it matches the 4th fret G...

Finally, it's back to the usual 5th fret method, with the B string at the 5th fret against the open high E string. Follow the same tuning process as before...

That's it! You should now know how to tune a guitar to itself anywhere!
Play a few chords to hear how accurately you tuned up, and make any tweaks necessary (the guitar's tension is altered slightly for each string you tune so you may need to go back and fine tune).
Over time your ear will become more acutely trained to matching up those notes, and you'll eventually find this to be the quickest and easiest way to tune up when playing by yourself or just with a vocalist or percussionist.
Don't forget to also take a look at the other relative tuning method using harmonics. You can also use harmonics as a cool effect in your playing, so it's also worth learning about harmonics in general.