Alex Basson has given you a great introduction to the mathematics. Let me approach the answer from a different perspective, that of the performing musician in a historical context.
Setting the mathematics aside, to put it simply, just intonation is what happens when you have a group of singers performing a capella, or a string quartet, or any other ensemble of monophonic instruments that can inflect or bend their pitch. But as soon as you insert a conventional piano or guitar (which are tuned to 12-tone equal temperament) into the ensemble, all the other instruments and performers will shift from just intonation into equal temperament so as not to clash with the guitar or piano. Singers and string players don't consciously think about it; it just happens.
There are also instruments in existence that play only in pure just intonation. These are instruments that can only play one scale in one key, and no extra notes outside of that. They include the natural trumpet or bugle (which have no keys, no valves, and no vent holes), or certain designs of the recorder, or the bagpipes.
Just intonation is extremely impractical for instruments that play chords (guitar or piano), or any instrument with fixed pitches which cannot bend, such as vibraphone or marimba.
How many keys do you want in an octave on your keyboard? In the Baroque period, 12-tone equal temperament had not yet been invented. Although the early harpsichords and organs had 12 notes to the octave, they used various tuning schemes that were based on just intonation. Each instrument could only be played successfully in a few keys with the tuning scheme in use.
To expand on that, innovative designers in the 1500s and 1600s built a few organs and harpsichords with between 14 and 36 different pitches/keys within one octave to be able to play in something closer to just intonation in many keys. (The previous link shows many different historical designs for keyboards that could play intervals that were closer to just intonation.)
To say that learning to play a keyboard with that many keys in an octave was an added difficulty to the keyboardist is an understatement. It also meant that harpsichords and organs had to have extra strings and extra pipes to play the extra pitches, adding significantly to the cost and the mechanical difficulties of building and maintaining the instrument.
This problem was largely resolved when the "Well-Tempered" tuning was invented and subsequently championed by J. S. Bach. Later on, true 12-tone equal temperament was developed. Around this time, most keyboard musicians lost interest in keyboards with extra keys/pitches for approximating just intervals in various keys.
In the modern era
there have been several designs for a just-intuned keyboard for electronic musical instruments, with many more than 12 keys/notes in an octave.
I know of one electric guitarist, Jon Catler, who plays guitars built with extra frets to make 31 equal-tempered notes in an octave. His purpose is to play conventional tonal music that enable a skilled performer to get close to just-intoned intervals in many keys; he's not composing and playing exotic non-Western scales or music. Lately he's been recording on a new guitar he designed with 64 notes in an octave that he says achieves just intonation in all keys.
Below are pictures of two guitar designs which he sells, and below that is a video demonstration, playing a guitar of yet a third design.
Here is a link to microtonal guitar fretboard designs.
Not many guitarists would want to learn to play one of those instruments. Take a close look at those frets on those fingerboards and you will see why just intonation on a guitar is impractical for anybody but a select few avant-garde musicians who want to go to the tremendous trouble to develop a very complicated playing technique in the name of creating more pure intervals.