As the Universe began to evolve regions began to emerge in which concentrations of the gases hydrogen and helium were higher than elsewhere. These formed the basis for the development of what we now recogonise as galaxies. Today galaxies are huge concentrations of stars, and display a number of types based upon their shape. They might also be thought of as the birth place of stars. Galaxies range in size from 80,000 to 150,000 light years in diameter. [A light year is the distance travelled, at the speed of light in a year.] Within this huge volume, galaxies contain very large numbers of individual stars — ca. 100 billion. There are at least 10 billion galaxies in the Universe.
Galaxies formed, perhaps within the first million years of the history of the Universe, by the inward gravitation collapse of the early matter of the Universe, thus enhancing the difference between regions where there was matter and regions where there was none. Inhomogeneities within galaxies, coupled with further gravitational collapse, are the basis for star formation. A galaxy starts to form by the accumulation of hydrogen gas in a very large cloud, called a nebula (see http://www.aao.gov.au/images.html/general/emission_frames.html). At this stage the gas cloud is huge compared with the later size of a galaxy. As matter aggregates in a growing nebula the internal gravity draws in more gases. Eventually the nebula develops localised 'clumps' of gas which continue to grow into even denser gaseous bodies — stars. View the first three images at http://rst.gsfc.nasa.gov/Sect20/A2.html to see the early stages in the development of a galaxy.