iāll try a 5minute version of the theory as well, why not:

frequency is a physical measure of cycles per second

its a good approximation to say that human hearing is sensitive to ratios between frequencies, which we call āintervalsā

therefore you can represent an interval as a unitless ratio such as 1:2 or 1:(3/2).

ājust intonationā generally implies that the ratio defining an interval is a simple fraction. the simplest fractions are just whole numbers [1, 2, 3, 4, 5, ā¦ etc]. whole numbers multiplied by a fundamental frequency define a harmonic series very common in nature.
_(ok, caveat: from here on out there is a focus on european music theory simply b/c that is what i know best.)
 the division of the octave into musical ratios is an ancient practice. e.g., ptolemy used a diatonic scale defined by these ratios in the 2nd century:
Do, Re, Mi, Fa, Sol, La, Ti, Do
1, 9/8, 5/4, 4/3, 3/2, 5/3, 15/8, 2
in this scale, each frequency has a mathematicallysimple relationship with the fundamental, which means that their waveforms are naturally āin syncā and we hear that lack of beating as a āclearā quality.
if you extend this to a chromatic scale, as people started to do in renaissance europe, you might get something like:
C, C#, D, D#, E, F, F#, G, G#, A, A#, B
1/1, 16/15, 9/8, 6/5, 5/4, 4/3, 45/32, 3/2, 8/5, 5/3, 9/5, 15/8
where each of these intervals is multiplied by whatever frequency you consider to be āCā at whatever octave.
ok, thatās just intonation. the āproblemā arose in late renaissance europe when people wanted to play music that changed keys. just intonation scales arenāt isomorphic, meaning the intervals between semitones are not consistent. for exampe, using the list above which weāll call āptolemaic 12toneā, the ratio beteen successive scale degrees is:
scale:
C, C#, D, D#, E, F, F#, G, G#, A, A#, B
1/1, 16/15, 9/8, 6/5, 5/4, 4/3, 45/32, 3/2, 8/5, 5/3, 9/5, 15/8
differences (approximately)
1.066, 1.0546875, 1.0666, 1.041666, 1.06666, 1.05468, 1.0666667, 1.06666, 1.041666, 1.08, 1.0416666
another consequence is: if you follow a ācircle of fifthsā using a 3/2 interval for a fifth, you donāt actually get a circle, but a spiral of expanding āpseudooctaves.ā
[handwaving past meantone, related keys etc etc.]
so, the solution of the baroque theorists was to make every semitone the same interval, regardless of position in the scale. (the fact that we even think of a āsemitoneā as a constant measure, reflects how embedded this idea of intervallic pitch has become.)
this means that the ratio beteen semitones must be an irrational number: the twelfth root of 2. call this interval c = \sqrt[12]{2}.
this means that if we go up from a fundamental f twelve times, each time multiplying by c, we end up at the octave.
so a whole tone interval in 12tet is equal to c^2, a major third is c^4, a fifth is c^7 and so on, always  regardless of which note or scale degree you start from.
this table shows, for one octave starting on 440hz:
 scale degree freq for JI scale above,
 scale deree frequency for 12tet scale,
 difference in cents
JI 
12tet 
diff (cents) 
440.0, 
440.0, 
0.0 
469.33333333333, 
466.16376151809, 
11.731285269778 
495.0, 
493.88330125612, 
3.9100017307746 
528.0, 
523.2511306012, 
15.641287000552 
550.0, 
554.36526195374, 
13.686286135166 
586.66666666667, 
587.32953583482, 
1.955000865388 
618.75, 
622.25396744416, 
9.7762844043899 
660.0, 
659.25511382574, 
1.955000865388 
704.0, 
698.45646286601, 
13.686286135164 
733.33333333333, 
739.98884542327, 
15.641287000552 
792.0, 
783.9908719635, 
17.596287865939 
825.0, 
830.60939515989, 
11.731285269778 
880, 
880, 
0 
supercollider code to generate the above:
// ptolemaic 12tone
r = [1/1, 16/15, 9/8, 6/5, 5/4, 4/3, 45/32, 3/2, 8/5, 5/3, 9/5, 15/8]
n = r.size
~ji_semitone_ratios = (n1).collect({i r[i+1] / r[i]});
// show differences between JI and 12tet
12.do ({ arg i;
var jf, twt, cents;
jf = 440 * r[i];
twt = (440.cpsmidi + i).midicps;
cents = (jf.cpsmidi  twt.cpsmidi) * 100;
postln(" " ++ jf ++ "  " ++ twt ++ "  " ++ cents ++ " ");
});
(BTW: its good to learn a bit of supercollider for investigating this stuff, because pretty soon you never have to look up a table again.)