Musicians have used many different tuning scales over the years, and there have been whole books written about the history and mathematics behind the scales that have been employed by different cultures and different time periods. The tuning scales that we use in popular and classical music found in the Americas and most of Europe almost always uses the "EqualTempered Scale", even though that is a relatively recent invention in terms of historical context. Throughout the rest of the world various differing scales are widelyused, but there are a few commonlyused constants that have emerged in music of all nations. The most commonlyheld concept is that an octave is generally around twice the pitch of any root note. (This is not always mathematically perfect in all cultures or in some historical contexts, but it's fairly close.)
Music of the Western Hemisphere gradually emerged into a scale consisting of 12 discrete intervals between two pitches that are a perfect octave apart, meaning that the pitch of each successive higher octave is mathematically double the pitch of the previous lower octave. How each of those 12 discrete intervals is derived is called "Temperament". There are several types of temperament, including "Just Intonation", "Meantone Temperament", "EqualTemperament", etc.
Western music also adopted the "A=440 Standard" some time ago, which refers to the physical reference point upon which equaltemperament is based. Specifically, this defines the base for a tuning standard where the A above "Middle C" on a piano is physically at 440 Hz.
There have been many different temperaments used in the Western Hemisphere, and many of these centered around specific intervals. For example, start with a C note, then find the perfect octave above; you now have the starting and ending points for your scale. Next, find the harmonically perfect 5th of G by tuning and listening to pitches, then use these intervals to find E, which is the major 3rd. Once done, you now have three notes of your scale and the octave. If you jump up to G and use the same process to find the 3rd and 5th, you get the B and D notes. If you keep repeating the process, you eventually derive all of the diatonic notes for your major scale. On a piano that would be just the white keys.
Leaving sharps and flats out of this example, (the piano's black keys), the problem is that if you keep using the perfect 5th for a reference, you gradually find that the notes in your scale are not lining up as you travel around the circle of 5ths. This occurs because using perfect 5ths will eventually introduce slight errors on other intervals, and the result will be that your scale works great in one or two keys, but other keys sound noticeably awful.
Here's why this happens: after having gone around the entire circle using perfect 5ths as a tuning guide, by the time you get to the octave above your starting note, the physical frequency for the octave is not the same as the last pitch that you derived from tuning based on the perfect 5ths. This is especially problematic when you use one particular note/key to tune an instrument, and then try to play in another key. For example, if you tune an instrument using perfect 5ths and start on a C note, the key of C# will sound distinctively outoftune. (See Comparing EqualTemperament with Tuning based on 5ths for more.)
These are problems of physics and mathematics, and therefore they are also problems of music, so music needed to find a way around this.
One possible solution to the situation listed in the Problems with Temperaments section is "EqualTemperament", or "The EqualTempered Scale". The trick is to use a mathematicallyderived constant for finding the interval between pitches instead of using perfect intervals or some other harmonic method. This constant is created by describing what the constant interval should be  which is 12 steps/pitches per octave, where the octave is always twice the physical frequency of the preceding pitch. This constant is therefore defined as the 12th root of 2, or 12√2, and can be represented in some computerbased formulas like the following:
dblInterval = 2^(1/12)
 or 
dblInterval = 10^((Log(2)/Log(10))/12)
If you calculated this value, you would get a large decimal value like the following:
1.0594630943592952645618252949463
Using A=440 as a starting point and using the above value, you would get the following frequencies in the scale:
One Octave of the EqualTempered Scale
Note 
Frequency 
A 
440.00 
A# 
466.16 
B 
493.88 
C 
523.25 
C# 
554.37 
D 
587.33 
D# 
622.25 
E 
659.26 
F 
698.46 
F# 
739.99 
G 
783.99 
G# 
830.61 
A 
880.00 
We see in the table that the octave is mathematically twice the value of the initial pitch, and therefore we have a "perfect" octave. This is harmonically "closeenough" to perfect intervals that most people cannot tell the difference, but some people with the gift of perfect pitch might.
The only "trouble" that some people might have with equaltemperament is that the intervals within the octave are not based on perfect intervals, but rather intervals based on the constant. This causes a lot of problems with people who tune "by ear" using perfect 5ths, which many guitarists do without realizing when they tune their guitars using harmonics over the 7th fret.
For example, if you were to tune an E note using an A note as a reference point, your ear would want to hear the perfect 5th for E which is 660 Hz, not the equaltempered E that is 659.26 Hz. Although the difference is very small, it is compounded over time as you tune the other notes within the scale. If you continued to tune using 5ths, your next note higher would be the B that is a 5th over E. Your ear would want to hear the perfect 5th again, so you would wind up with 990 Hz for B instead of the equaltempered 987.77 Hz. Another perfect 5th would be 1485 Hz instead of the equaltempered 1479.98 Hz, then 2227.5 instead of 2217.46, etc.
Also see the tuning lessons and Appendix E on this web site for additional information about tuning the guitar.
