In astrophysics, the questions of galaxy formation and evolution are How, from a homogeneous universe, did we obtain the very inhomogeneous one we live in?, How did galaxies form?, How do galaxies change over time?
The formation of galaxies is still is one of the most active research areas in astrophysics; and, to some extent, this is also true for their evolution. Some ideas, however, are now widely accepted.
After the Big Bang the universe had a period when it was remarkably homogeneous, as can be observed in the Cosmic Background Radiation, the fluctuations of which are less than one part in one hundred thousand.
The most accepted view is that all the structure we observe today was formed as a consequence of the growing of primordial fluctuations by gravitational instability. Recent data strongly suggests that the first galaxies formed as early as 600 million years after the big bang, much earlier than astronomers had previously believed. That leaves hardly enough time for the tiny primordial instabilities to grow sufficiently.
A great deal of the research in this area is focused on components of our own Milky Way, since it is the easiest galaxy to observe. The observations which must be explained in, or at least not at odds with, a theory of galactic evolution, include:
The earliest modern theory of the formation of our galaxy (known by astronomers as ELS, the initials of the authors of that paper) describes a single (relatively) rapid monolithic collapse, with the halo forming first, followed by the disk. Another view published some years later (known as SZ) describes a more gradual process, with smaller units collapsing first, then later merging to form the larger components. A even more recent idea is that significant portions of the stellar halo could be stellar debris from destroyed dwarf galaxies and globular clusters that once orbited the Milky Way. The halo would then be a "new"er component made of "recycled" old parts!
In recent years, a great deal of focus has been put on understanding merger events in the evolution of galaxies. Rapid technological progress in computers have allowed much better simulations of galaxies, and improved observational technologies have provided much more data about distant galaxies undergoing merger events. After the discovery in the last decade that our own Milky Way has a satellite galaxy (the Sagittarius Dwarf Elliptical Galaxy, or SagDEG) which is currently gradually being ripped up and "eaten" by the Milky Way, it is thought these kinds of events may be quite common in the evolution of large galaxies. The Magellanic Clouds are satellite galaxies of the Milky Way that will almost certainly share the same fate as the SagDEG. A merger with a fairly large satellite galaxy could explain why M31 appears to have a double core.
The SagDEG is orbiting our galaxy at almost a right angle to the disk. It is currently passing through the disk; stars are being stripped off of it with each pass and joining the halo of our galaxy. Eventually, only the core of SagDEG will exist. Although it will have the same mass as a large globular cluster like Omega Centauri and G1, it will appear rather different, as it has far lower surface density due to the presence of substantial amounts of dark matter, while globular clusters appear, mysteriously, to contain very little dark matter.
Giant ellipticals are probably formed by mergers on a grander scale. The Milky Way and M31 are gravitationally bound, and currently approaching each other at high speed. Eventually they will meet and pass through each other, gravity distorting both galaxies severely and ejecting some gas, dust and stars into intergalactic space. They will travel apart, slow down, and then again be drawn towards each other, and again collide. Eventually both galaxies will have merged completely, streams of gas and dust will be flying through the space near the newly formed giant elliptical galaxy. Out of the gas ejected from the merger, new globular clusters and maybe even new dwarf galaxies may form and become the halo of the elliptical. The globulars from both M31 and the Milky Way will also form part of the halo; globulars are so tightly held together that they are largely immune to large scale galactic interactions. On the stellar scale, little will happen. If anybody is around to watch the merger, it will be pretty much an anticlimax, although the sight of a distorted M31 spanning the entire sky should be spectacular. M31 is actually already distorted - look at the edges of it, they're warped. This is because of interactions with M33, a face on spiral galaxy not far from M31. Eventually all three galaxies will form one giant elliptical galaxy, rushing to take its place in the Virgo Supercluster.
In our epoch, large concentrations of galaxies (clusters and superclusters) are still assembling. This "bottom-up" picture is referred to as hierarchical structure formation (similar to the SZ picture of galaxy formation, on a larger scale).
While we have learned a great deal about ours and other galaxies, the most fundamental questions about formation and evolution remain unanswered.