The duration of the beat is set by the tempo marking, usually an italian word like lento, andante, vivace, etc. that you may have noticed at the beginning of musical scores.
These words correspond to an approximate setting of beats per minute (bpm), that you find for example in wikipedia and is usually also marked on the scales of metronomes. But the performer or conductor must make is own judgement as to the precise tempo to use.
So, for example, an andante tempo marking is considered to be somewhere between approximately 76 and 108 bpm. Taking 90 bpm as example, for a 4/4 time signature:
- 4 beats/measure
- 1 beat = 1 quarter note
- 1 quarter note = 1 metronome beat at 90 bpm (so 1/90*60 = 0.67 seconds/beat, but measuring rythmic-units duration's in seconds is not something usually very useful musically).
Now, something to keep in mind is, metronome scales and conventional bpm ranges for tempo markings do indeed assume a beat unit of a quarter note, but that's not always true. The time signature used for each piece defines, in its lower number, what rhythmic unit corresponds to a beat (many times a quarter note, yes, but also frequently an eighth and some times a half note, or other values).
For example, for a 3/8 time signature (not very frequent, but for the sake of example) and the same andante tempo marking:
- 3 beats / measure
- 1 beat = 1 eight note
- 1 metronome beat = 2 measure beats, if you set the metronome to 90 "quarter notes/minute". So in this case, to mark the actual beat, the metronome should be set to 180.
This is important, as the beat unit defines the intended musical "pulse" of the piece, so it's not the same thing a "pulse" of 3 quarter or of 6 eight notes per measure, despite the overall measure duration resulting the same.
We should also refer the case of compound time signatures, where a beat is a dotted rythmic note. For a 6/8 time signature:
- 2 beats / measure
- 1 beat = 3 eight notes = 1 dotted quarter note
- 1 metronome beat = 1.5 measure beats. So in this case, to mark the actual beat, the metronome should be set to 135.
To avoid any confusion and provide more precise performance instructions, since the invention of the metronome some composers provide tempo markings in precise bpm.