It is currently accepted that spacetime came into existence almost fourteen billion years ago in the hot big bang. Scientists proved this in the 20th century and have since tried to discover as much about this event as possible.
General Relativity predicts that the universe began as a gravitational singularity, a place with no volume, where the laws of physics break down. A theory which combines quantum mechanics and general relativity such as string theory or loop quantum gravity, is needed to better understand this epoch of the universe.
It is thought that during the first 10^-43 (0.1 with forty two 0s between the decimal and the 1) seconds after the big bang all four fundamental forces - electromagnetism, gravitation, the weak nuclear force which is responsible for radioactive decay, and the strong nuclear force which binds the nuclei of atoms together - were united as one single force.
As the universe expanded, it cooled, and these forces began to separate. Within 10^-36 seconds, gravitation and the strong nuclear force had both separated. As they did, they released enough energy to rapidly 'inflate' the universe. During inflation spacetime expanded faster than the speed of light, and this explains how vastly distant objects could have once been in contact. Inflation does not contradict Einstein's theory of special relativity as this shows that nothing can move through spacetime at the speed of light.
Inflation also explains why the universe appears to be flat; if you imagine you are sitting inside a very small sphere then the floor will be curved, but if the sphere is big enough then the floor will appear flat. The larger the sphere the flatter it will appear. Finally, inflation solves the problem of why magnetic monopoles - magnetised particles which possess only one pole - are so sparse. Monopoles must have been produced before inflation, the small amount that were made were then separated by vast regions of spacetime.
The inflationary epoch lasted for less than a billionth of a second but by then the volume of the universe had expanded by a factor of over 10^78. The universe is not perfectly symmetrical because of the expansion of quantum fluctuations - the spontaneous temporary change of energy to a point in spacetime - which occurred during inflation. These forced matter and energy to become unevenly distributed and allowed objects like stars to become gravitationally bound.
The first electrons and anti electrons were created shortly after inflation when any residual energy decayed into particles, travelling at the speed of light. The universe continued to expand, just at a slower rate than before. Within a second, it had cooled enough for protons, anti protons, neutrons and anti neutrons to form.
Light was created within ten seconds of the big bang when almost every particle and its corresponding antiparticle annihilated each other, although the universe was too dense for it to illuminate anything. It is assumed that there must have been more matter than antimatter before this, otherwise all matter would have been annihilated.
After about twenty minutes, the temperature of the universe was low enough for protons and neutrons to fuse together. This process is known as big bang nucleosynthesis. During this time, three times more hydrogen than helium was produced, by mass, as well as trace amounts of deuterium - an isotope of hydrogen - lithium, beryllium and possibly dark matter.
Almost four hundred thousand years later, the universe had cooled enough for electrons to attach to the hydrogen and helium nuclei, neutralising the atom. This process is known as recombination. After recombination, light was able to move freely about the universe. This light is still visible in all directions but it has become red shifted, to the microwave spectrum.
We now know that the universe is accelerating in its expansion. In order to account for this unknown energy physicists have had to reintroduce a parameter similar to Einstein's cosmological constant, this is known as dark energy. The cause of this energy is still unknown but it is expected to make the universe expand forever, rather than ending in a 'big crunch'.
Small objects like stars formed before larger objects like galaxies and galaxy clusters. The first stars are thought to have formed about two to four hundred million years after the big bang and planets begun to form when the first generation of stars expired. The first galaxies formed within four hundred million years of the big bang.
The oldest stars in the Milky Way are over thirteen billion years old but it is thought that the disc of the Galaxy formed about nine billion years ago. The Solar System is relatively new, having formed about four and a half billion years ago.