When you see multiple galaxies right on top of each other, like in this image, it's usually an optical illusion, and the galaxies are actually millions of light-years apart. That's true of one of the galaxies in this photo...but only one.
There are five galaxies in this image - the two bright spots of yellow right next to each other are two distinct galaxies. Together, they form the first identified example of what's known as a compact galaxy group. It was originally called Stephan's Quintet, but, as NASA explains, one of the members had to drop out:
About 300 million light-years away, only four of these five galaxies are actually locked in a cosmic dance of repeated close encounters. The odd man out is easy to spot, though. The interacting galaxies, NGC 7319, 7318A, 7318B, and 7317 have an overall yellowish cast. They also tend to have distorted loops and tails, grown under the influence of disruptive gravitational tides. But the predominantly bluish galaxy, NGC 7320, is closer, just 40 million light-years distant, and isn't part of the interacting group.
While the image up top is pretty damn breathtaking - particularly if you click to expand it to its full resolution, which I'd recommend - it might not be the most helpful in keeping all the different galaxies of Stephan's Quintet/Quartet straight. To that end, here's a useful diagram of all the galaxies from the Hubble Site.
As you might notice, there's a fifth galaxy on the far left of the diagram which isn't in the image up top. That fifth galaxy, NGC 7320C, happens to be 300 million light-years away, just like the other four galaxies, and it's thought this particular galaxy has crashed the tightly knit quartet at least once or twice, crashing through the center of the group and ripping away gas before coming back for another pass. This galaxy would bring the numbers back up to a quintet - but make no mistake, NGC 7320C is the bad boy in this particular cosmic dance group.