http://en.wikipedia.org/wiki/Equal_temperament
As a side (historical) note, one of the earliest champions of Equal Temperament (or Well-Temperament) was Bach, who wrote The Well Tempered Clavier as a kind of advertisement for this tuning system. Prior to systematized equal temperament, it was impossible for an instrument to play in all 24 keys without being re-tuned. On a Well-Tempered instrument, you can play straight through all 24-keys without stopping to be retuned.
Singers (and brass players, and any other instrument that allows for fine, sinlge-cent level tuning) often use a different system called Just Intonation:
http://en.wikipedia.org/wiki/Just_intonation
Just Intonation is "more in tune" than Equal-temperament, but it is not noticeable by most people. I teach music for a living and have a degree in music theory and I have a very difficult time telling the difference.
EDIT: Yes, I did oversimplify by conflating equal temperament and well-temperament, but in the modern debate, they do tend to get lumped together.
First off, an A is not always the same as another A. Some time in the last century (wikipedia if you want the exact date, in fact, if you want further reading, just wikipedia some key phrases from this response) it was decided upon that concert A should be 440Hz - this, as I understand it, was largely in search of consistency between manufacturers. Before that, A had been set at a number of points, going down into the 40teens.
That's only the beginning of complications. As it turns out, even if you can get everyone to agree on a base frequency, different methods of calculating the proper frequency yield different results. Pythagorean Tuning uses whole number ratios to calculate the frequencies, starting with 3:2 (a perfect fifth). [Quick note: if you've never seen Donald Duck in Mathmagic Land, youtube it now] But this method has the unfortunate outcome of giving slightly different values for the diminished fifth and the augmented fourth - which are theoretically the same note.
To ancient musicians, this was like getting a wooden train set and putting the curved pieces together in sequence, only to find that they didn't form a circle. The proverbial last piece is known as the wolf interval*.
So people started to fudge it. This is called temperament. There's a bunch of different ways (mathematically and mechanically) to do it, but I don't really have the time or understanding to get into all of them so I'll skip forward to present day. If you walk into your local music shop and play a chromatic scale on a random keyboard, you'll likely hear what's called Equal Temperament. In short, divide your octave into equal parts (in the case of this example, 12) and you have your 12 notes to a chromatic scale.
And it's just that simple. Of course I skipped over tons, but I'm similarly on my way out the door, so deal with it. Or e-mail me if you really care.
If you're not a musician, producer, technician, or the like, [http://en.wikipedia.org/wiki/Music_and_mathematics] should be more than you'll ever need to know. In fact, I wish I had known about that page 10 years ago.
Not enough? This is the textbook I used in school on the topic. It's a little less historical and more sciencey, if that's your bag: http://www.amazon.com/Acoustical-Foundations-Music-John-Back...
See wikipedia entry on pitch perception for more examples:
http://en.wikipedia.org/wiki/Pitch_(music)#Perception_of_pitchHere is a nice article from Slate about all this:
http://www.slate.com/id/2250793/
(EDIT: GMTA, it seems.)
http://www.slate.com/id/2250793/pagenum/all
It covers the history of tuning systems and how many different definitions there are of 'in tune'.