As spectroscopists began to study more and more distant stars, they noticed a peculiar effect:
the Doppler effect for light from distant stars [apparent in the H atom line spectrum, for instance] was not randomly scattered between red and blue shifts, as might be expected for a Universe full of stars "milling about." Instead, Hubble discovered that the more distant the star, the bigger the red shift. That is, all the other stars are, on average, moving away from us ; and the more distant the star, the faster it is receding.
It was a relatively easy matter to estimate from Hubble's constant how far away a star would have to be in order to be receding from us at the speed of light; the answer was in the neighbourhood of 10-20 billion light years. Since none can be moving any faster than the speed of light, this sets a crude limit on the size of the Universe.
Moreover, if this has been going on for 10-20 billion years, then all those stars and galaxies are shrapnel from an explosion 10-20 billion years ago that sent us all flying apart at velocities up to the speed of light. This scenario is known as the Big Bang model of the origin (and subsequent evolution) of the Universe.
What a picture! In the moment of Creation, all the matter in the Universe was at a single point, after which [to use the refined understatement of Cosmologists] "it began to expand." Initially the energy density was rather high, obviating all our notions about elementary particles, the heaviest of which looks like empty space by comparison. Only after the Universe had expanded and cooled by many, many orders of magnitude was it possible for the particles we know to "freeze out" and begin to go their separate ways.
Modern Cosmologists spend a great deal of their time worrying about the details of the "Early Universe," meaning the period from "t=0" of the Big Bang until today's elementary particles condensed from the primal fireball. This explains (as promised) why there is often not much separation between cosmology and elementary particle physics - basically, the big was once small.