A standard string quartet consists of 2 violins, 1 viola, and 1 cello. This combination has been the defining chamber music ensemble since the Classical period, established by composers such as Joseph Haydn (often called the "father of the string quartet"), Mozart, and Beethoven.
The two violins are distinguished as first violin (which usually carries the melody) and second violin (which often plays a supporting or counter-melodic role). The viola provides the inner harmony, and the cello supplies the bass line and harmonic foundation.
This specific combination was chosen because it provides a complete four-part harmony with a balanced range from high to low, while maintaining a unified timbral quality since all four instruments belong to the same family.
Note that the double bass is not part of a string quartet. A string ensemble that includes a double bass alongside violins, viola, and cello would be a string quintet or part of a larger formation.