First: You cannot "prove" something in physics. It is possible to falsify a theory by experiments. But if experiments and theory agree, this does not prove the theory. If many different measurements are in agreement with predictions from this theory, it is a good theory. But it can never be proven.
How did they invent the theory? They analysed the particles produced in these collisions. In high-energy collisions, a lot of particles are produced. Before the quark model, they were all considered as elementary particles, and soon 30+ of them were known. But then they found patterns in their properties. The quark model was able to explain those patterns with just 4 (today: 6) quarks, and to predict the existence of new particles, which were found later.
It is possible to calculate a lot of properties of the particles with the quark model. And up to now, no serious deviation from these predictions was found.