A galaxy is a huge collection of stars, nebulae, gas, planets, comets and almost anything that can be found in the universe, held together by the gravitational attraction between each of them. The smallest galaxies contain as little 100,000 stars while the bigger ones can contain more than 3000 billion. Groups of stars smaller than 100,000 stars are usually considered rogue star clusters, rather than true galaxies.
Most galaxies clump together in groups, held together by gravity, in a 'local group'. Our galaxy, the Milky Way, is a local group. Some of these groups, like the Virgo cluster and the Coma cluster, are massive and contain thousands of galaxies over an area in the region of 20 million light-years across. Other groups contain smaller numbers of galaxies. The local group contains about 30 galaxies, scattered across an area approximately five million light-years across. Multiple groups also form larger groups called super-clusters. You can see a lot of galaxies in the Hubble Deep Field image, taken by the Hubble Space Telescope with an exposure of a few days on a very small area of sky.
To the naked eye galaxies are not very bright. Apart from the Milky Way and its companions the two Magellanic Clouds (which are both only observable from the southern hemisphere), only a few are visible, and they appear as faint fuzzy patches in the sky. Before the arrival of astronomical photography in the 19th Century these galaxies looked very similar to the clouds of gas, which could be seen throughout the night sky, called nebulae. Many astronomers studied these nebulae and their nature. One of these astronomers was Edwin Hubble, after whom the Hubble Space Telescope is named. Hubble made the breakthrough that put galaxies in their rightful place as completely independent systems.
As astronomers further investigated galaxies, they discovered unusually active galaxies (also called Quasars), which emit intense amounts of electromagnetic radiation1, much more than would be expected from their size. One type of active galaxies, radio galaxies, appear to be extremely disturbed, particularly in their central region. Some emit as much energy in the form of radio waves as they do in visible light. These radio galaxies are surrounded by huge clouds of material, thrown out by beams of electrically charged particles and radiation shooting away from the galaxy's centre. Other galaxies known as Seyfert galaxies have unusually bright centres sending out radiation from their centre. While others, starburst galaxies, have apparently gone through a massive burst of star formation. Active galaxies are likely to have super-massive black holes at their centres; this explains the amazing amounts of energy present in them.
Catalogues and Names
Most galaxies have numbers, usually prefixed with 'M' or 'NGC', depending on who catalogued them; some appear in both catalogues. 'M' stands for Messier, the name of an astronomer who compiled the first major catalogue of celestial objects in 1781. These included nebulae and galaxies. 'NGC' stands for the New General Catalogue made in 1888 by JLE Drayer. A smaller number of galaxies have been named. Some are named after the discoverer, such as the Magellanic Clouds; some after where they are in the sky, such as the Andromeda Galaxy; and others by what they look like, such as the Cartwheel Galaxy.
Galaxies often have distinctive shapes. Some are irregular, some are spiral, some are barred spirals and some are elliptical.
A large number of galaxies, including our own, are spiral-shaped. They have a 'bulge' in the centre that is roughly spherical, and thin spiral arms coming out of it. They have been described as 'two fried eggs slapped back-to-back.' Not the most poetic description, considering that spiral galaxies are, to most astronomers, the most beautiful sight through a telescope, with the possible exception of Saturn. Spiral galaxies are among the most common, and usually the biggest.
Some spirals look like the arms come out of a small bar sticking out of the central bulge. It is thought that this is a temporary phenomenon, which explains its rarity.
Some of the smaller galaxies do not form clear spirals, but just have a roughly elliptical (oval) shape.
A small number of galaxies, normally the smallest, do not have any clear shape at all. This is very rare, as most galaxies are forced into some sort of shape by the fact that they spin about the centre. Some galaxies are not truly irregular, but don't fit into the other categories; these are often the most interesting shapes, such as the Cartwheel galaxy which has a centre similar to spirals but has a large ring some distance away from it, with 'spokes' joining it to the centre.
Events Concerning Entire Galaxies
Some events can affect an entire galaxy, or even multiple galaxies.
The creation of galaxies is something of a mystery. The only way that makes sense is that, due to uneven distribution of hydrogen and helium atoms a few thousand years after the big bang, areas of the gas which made up the universe began to compress under the pull of gravity. This smaller, denser gas-cloud then developed other areas of higher density and compressed to eventually form stars, planets and anything else. This sounds rather simple. Scientists are currently unsure how the early universe could have become uneven; the current Big Bang theory dictates that the universe should be homogenous, or completely even.
Although most galaxies are moving apart due to the expansion of the universe, some are in fact moving together. An example of this is our own Milky Way and the Andromeda Galaxy (M31). Eventually those two galaxies will collide2. When galaxies do collide, very unusual things can happen. It is not statistically likely for any stars (or anything else) to actually hit each other. What does happen is the gravity of the stars of one galaxy disrupt the other, and visa versa. This can cause large numbers of stars to be created in interstellar gas-clouds, for example. Another observable consequence is that the shape of one, or both, galaxies can be distorted. An example of this is a Cartwheel galaxy, discussed above.