Answer:
Some galaxies are given descriptive names (e.g. "Andromeda", "Whirlpool") if they are particularly distinctive in location or appearance. But most galaxies are known from their designation in a catalogue. One of the earliest catalogues of objects in the sky was made by Charles Messier.