A century ago astronomers talked about only one galaxy, what they called the "Stellar System" or the Milky Way. The term "galaxy" was used almost synonymously with "universe," and when a distinction was drawn, the issue was mainly whether or not the universe had an extent beyond that of the stars. Twenty-five years later our galaxy was established as one of many and the study of what Edwin Hubble had first dubbed extragalactic nebulae was burgeoning. Astronomers had analyzed the light of other galaxies spectroscopically and determined that it was starlight. We still take this as one of the defining characteristics of a galaxy: its visible light comes primarily from stars. Today we are nearly overwhelmed with data on the immense diversity of galaxies, to the extent that it actually becomes difficult to write down a definition that distinguishes what is a galaxy from everything that is not.
Basically, galaxies are the fundamental units of structure in the universe where stars form. Theory currently holds that all galaxies are confined by the gravity of the dark matter halos that permeate and surround them, but there is recent evidence that some galaxies may be dark-matter-free. It is also tempting to say that galaxies are where most of the ordinary matter in the universe resides, but recent x-ray observations have shown that there is actually more matter in the diffuse intergalactic gas than in the galaxies themselves.
It is slightly easier to define what doesn't constitute a galaxy. Any object that can exist as a distinct unit inside a galaxy isn't a galaxy, which excludes the globular star clusters from galaxyhood. Dwarf galaxies are more luminous (typically by a factor of 100) than globular clusters and are not as dense. The distinction between dwarf and normal galaxies is mostly, but not entirely, one of size: dwarfs generally don't come brighter than a few billion solar luminosities (a few percent of that of the Milky Way). Qualifying a type of galaxy is also an issue of environment. A small galaxy may be dubbed a satellite if it is orbiting a larger system, but merely called a field galaxy if is not linked to a bigger galaxy. Satellites are often ingested by their larger cousins, and when this happens, the smaller galaxy loses its identity. This is the likely fate of many of the dwarf galaxies around the Milky Way, including the Sagittarius dwarf and the two Magellanic Clouds. The larger of these clouds, however, technically isn't a dwarf at all but a "Magellanic Irregular," which tells you how arbitrary it is to put human labels on cosmic objects.