Over the course of the past several decades, cosmologists have used countless observations to come up with a sort of biography of the universe, a model of the history and structure of the universe often called (in combination with the universe's ingredient list) the "Standard Cosmology". A brief outline of the Standard Cosmology is given below - for more detail, see The Universe Adventure or send a question to our FAQ page!
The Big Bang Model
The universe began (or, at least, became interesting) approximately 13 billion years ago when it began expanding from an almost inconceivably hot, dense state. Ever since then, the universe has more or less continued its long process of expansion and cooling, eventually reaching the cold, sparse state we see today.
In the first 10-34 seconds or so of the universe's history, it underwent a brief period of extremely fast expansion, known as inflation. This period smoothed out the universe's original lumpiness and left it with the homogeneity and isotropy we see today. Quantum mechanical fluctuations during this process were imprinted on the universe as density fluctuations, which later seeded the formation of structure.
The early universe was a soup of matter and energy, in which particle/antiparticle pairs were constantly being born and annihilating. As the universe cooled, it eventually became too cold to produce certain kinds of particles - for example, proton/antiproton pair creation stopped below a few trillion Kelvin, while electron/positron pair creation continued until temperatures of a few billion Kelvin. After this point, the remaining particle/antiparticle pairs quickly annihilate, leaving little behind. When this process happens for a particular species of particle, that particle is said to have frozen out. The only reason we have any matter in the universe at all is because of a poorly-understood process called baryogenesis, caused by an asymmetry in the physics of matter and antimatter.
During the first 10 minutes or so, various light elements such as deuterium (a heavy isotope of hydrogen), helium-3, helium-4, and lithium-7 are created by the combination of free protons and neutrons created in baryogenesis. This process of light-element formation is called Big Bang nucleosynthesis.
After about 100,000 years, the universe finally cools to a few thousand Kelvin, cold enough for free nuclei and electrons to begin to combine into atoms. This process occurs during a time period called the era of recombination. Before recombination, the universe was opaque to light and other electromagnetic radiation - the large number of free electrons are just too good at scattering light. After the formation of atoms, the universe becomes transparent - it becomes possible for light to travel large distances (for example, across the visible universe) without getting knocked off course too badly. The light released at this time is perceived today (after redshifting by the universe's expansion) as the cosmic microwave background, the afterglow of the Big Bang's heat. By this time, dark matter (unaffected by the behavior of the baryonic matter) had already begun to collapse into halos.
Galaxies and stars began to form after a few hundred million years, when the baryonic gas and dust collapsed to the center of the pre-existing dark matter halos.