GALAXY FORMATION
At that time, the temperature of the universe was 1000 billion degrees (1012) K, and the photons of what would become the background radiation carried so much energy that they were interchangeable with particles.
As the universe expanded and cooled over the next four minutes, some of the photons condensed out as protons and neutrons, the building blocks of atomic nuclei, while the temperature fell steadily.
A quarter of these particles ended up as nuclei of helium, and the rest stayed as lone protons, hydrogen nuclei. But it was still too hot for these nuclei to attract electrons and become neutral atoms; for a while, the electrons continued to interact with the radiation.
It took between 300,000 and 400,000 years for the temperature of the universe to fall below the temperature at the surface of a star, at which point the photons could decouple from the matter and become the background radiation we detect today.
All this time, the atomic (or baryonic) matter was embedded in a sea of dark matter, which does not interact with radiation. Small irregularities in the distribution of the dark matter produced regions of higher density, whose gravity pulled both kinds of matter into clumps, linked together along filaments of dark matter like beads on a string. These clumps attracted more matter by gravity, like water flowing into a pothole in the road.
By about 20 million years after time zero, dark matter potholes were attracting streams of baryonic material, which formed stars and galaxies as it was concentrated by the gravity of the dark matter.
THE MULTIVERSE
Scarcely more than a billion years after time zero, less than one-tenth of the age of the universe today, as well as many smaller galaxies there were already some proto-galaxies as large as the Milky Way, embedded in haloes of dark matter containing as much as 1000 billion solar masses of material, with quasars or other forms of black hole activity at their hearts.
From then on, galaxies grew and evolved through mergers, as we described earlier.
But cosmologists are not content with knowing how the universe has developed since 0.0001 seconds after time zero. They want to probe back even farther into the past. This is where the educated guesswork comes in, and there is no single theory, or model, which everybody agrees on.
Which model you prefer depends to some extent on your personal taste, and as we don't have room to discuss them all we will only describe the one that we like best.
According to that model, the entire universe that we can see is just part of a bubble within a much larger region of spacetime. This may be literally infinite in both time and space; in order to distinguish it from what we usually mean by the term universe, it is sometimes called the cosmos, and the implication is that there may be other bubble universes spread through the cosmos like the bubbles in a fizzy drink.
If the cosmos is infinite in time, that means it has always existed, always will exist, and there is neither a beginning nor an end of time for us to worry about. If it is infinite in space that means it extends forever in all directions and there are no edges to worry about.


The shape of the universe
Regarding the way we see the shape of the universe,"open","closed","flat".Maybe it's possible that there are other geometries,just not avilable to the common eye.Of course this point does spill over into 'religion',but maybe for to long now we have been seeing the universe through scientific blinkers. Maybe there is a need to take a more "holistic" view?
Excellent science writing
Thanks to John Gribbon for laying out all these ideas with exceptional clarity.