Five-limit tuning gets its ratios from the observation that thirds and sixths are particularly pleasant when they are tuned according to the overtone series. Most notably, when the major third is in tune with the fifth harmonic of the root, the ratio of the pitches is 5:4.
Other intervals may be derived from this interval and the basic interval of three-limit (better known as "Pythagorean") tuning, which is the perfect fifth with a ratio of 3:2, through inversion, composition (stacking intervals on top of each other) or complementation (finding the interval between two other intervals -- and inversion is in fact a special case of complementation where one of the two intervals is the octave).
To compose two intervals, multiply their ratios. For example, the major seventh is the composition of the perfect fifth and the major third, so its ratio is 15:8.
To calculate the complement of one interval with respect to another, divide their ratios. For example, the minor sixth is the inversion, or octave complement, of the major third, so its ratio is 8:5, and the minor third is the fifth's complement of the major third, so its ratio is 6:5.
The whole step or tone is the composition of two perfect fifths, octave adjusted, so 9:8, but the interval between 5:4 and 9:8, which is also a whole step, is 10:9, giving us two different sizes of whole step, known as the major tone and the minor tone.
Intervals may of course be calculated in more than one way, which sometimes gives the same result and sometimes does not. The major sixth, for example, is the octave complement of the minor third (which gives 5:3) and the composition of the perfect fourth and major third or of the perfect fifth and minor tone (also 5:3). But it's also a perfect fifth above the major second, which is a major tone, and combining those intervals gives a ratio of 27:16.
The ratio between 27:16 and 5:3 is the same as the ratio between 9:8 and 10:9, that is to say 81:80. This is known as the syntonic or Ptolemaic comma. It is slightly smaller than the (perhaps better known) Pythagorean comma.
The term "five limit" comes from the observation that building intervals in this manner from the major third, perfect fifth, and octave yields a system where the prime factors of the ratios are only 2, 3, and 5. In other words, the prime factors are less than or equal to 5.
As to how this system compares to equal temperament, well, the major third is about 14 cents narrower, the minor third is about 16 cents wider, and the perfect fifth is about two cents wider. Accordingly, if you try to tune a keyboard in 5-limit just intonation, some intervals will be very pure and well tuned, whereas others will be very badly out of tune (notably the 27:16 perfect fifth that usually appears between the second and sixth degrees of the major scale). (Consequently, as Pythagorean tuning came to be seen as unsuitable for keyboards, it was replaced not with just intonation but with various meantone temperaments, but a discussion of meantone temperaments is beyond the scope of the question.)
Alternatively, if you use just intonation with singers or instruments that can alter the tuning of individual notes during a performance, you typically find that a given pitch has to be tuned differently in different harmonic contexts.