There are thousands upon thousands of celestial objects, discovered by hundreds of different individuals over the course of centuries. While many of them have easy to remember names—like the Orion Nebula, the Lagoon Nebula, the Butterfly Nebula and the Hourglass Nebula—most have designations that are anything but. Moreover, the memorable names aren't always recognized by the International Astronomical Union (IAU): the organization with the sole authority to give names to celestial bodies.
Even they tend to go with names that are mixtures of seemingly random characters, which aren't really random at all. In astronomy, names aren't just for reference. Rather, each designation is meant to convey important information about the object itself, and more often than not, objects are appointed with more than one name. Take the Andromeda Galaxy, for example. Although most call it by its unofficial name, (based on its constellation in Andromeda), it is officially cataloged as Messier 31 (M31) and NGC 224.
What's in a Name?
Anytime you see "Messier" (or just "M") in front of a number (usually 2 digits, 3 at the most), it means that the object is included in the Messier Catalog. Most, but not all, of these objects—the final edition includes 110 celestial objects—were discovered by Charles Messier in the late 18th to early 19th centuries (Since this was before the age of telecommunications, some of the objects were originally observed by other astronomers, only to be independently discovered at a later time).
Andromeda's other designation—NGC 224—is a result of its inclusion in the New General Catalog [of Nebulae and Clusters of Stars] (known simply as NGC). There are several iterations of the catalog, beginning with the General Catalog of Nebulae and Clusters (GC); It was compiled by William Herschel in 1786. Building on his father's 2,500-entry-catalog, John Herschel published the second edition, which laid the foundation for the third—published in the late 1800's by John Louis Emil Dreyer.
You will also encounter IC, which is short for Index Catalogs [of Nebulae and Clusters of Stars]. There are a few other catalogs out there, and numbers that follow the acronyms can correspond to a few different things. Either they are used as reference points, or they point to the coordinates of the objects in question.
Individual Stars & Planets:
Planets, on the other hand, aren't included in the New General Catalog. There are a whole lot of different categories though. Most often, they come with prefix HD, GJ, or Kepler.
HD—short for the Henry Draper Catalog—was first derived in the early 20th century. Since the original (known as the Draper Catalog of Stellar Spectra) was released, over 350,000 stars—covering almost the entire night sky—have been identified and cataloged... many too faint to be seen by the naked eye.
The HD catalog now includes a rather impressive collection of planets as well. With the stars, the numbers depend on which edition they were first included in. The first, starting at 1 and ending at 225300, are numbered by right ascension for 1900.0. The second amendment numbers from 225301 to 359083—corresponding to spectral classifications.
HIP, or the Hipparcos catalog, deals with the objects discovered by the ESA's Hipparcos satellite. Naturally, Kepler objects come from the Kepler Space Telescope. Similarly, KOI represents "Kepler Object of Interest." Finally, there's the Gliese–Jahreiß (GJ) catalog. It categorizes objects within 82 light-years of Earth.
Many stars, like our Sun. don't have static luminosities. Often, they are subject to change on a whim. We call them variable stars, and they are sorted mostly based on their constellation.
According to the IAU, names consist of "one or two letters and the constellation name (such as U Sagittarii or RR Lyrae) or a number preceded by "V" and the constellation name (e.g., V 1500 Cygni)."
"In each constellation, the first variable discovered is assigned the letter "R" and the genitive of the constellation name, e.g., "R Andromedae" (a long period variable), the second one is "S" (e.g., "S Andromedae" is the supernova which occurred in the Andromeda galaxy, M31), and so on up to "Z" for number 9; then the tenth variable is assigned "RR", followed by "RS" etc up to "RZ", "SS" (not "RS"), etc. up to "SZ", and so on up to "YY", "YZ", "ZZ", and then "AA", "AB", etc to "AZ", "BB" to "BZ", up to "QQ" to "QZ" (where the letter "J" is not used to avoid confusion with the letter "I")."
"Counting, this scheme provides 334 designations for each constellation, and variables starting from number 335 are designated "V 335", "V 336" etc."
Comets & Asteroids:
The names of comets and asteroids are more straightforward. They have one letter, a slash, four numbers, another letter and more numbers. The first is based on the object's orbital characteristics. If it is a periodic comet, it is represented by a P; Non-periodic comets are represented with a C; If the orbital period can't be narrowed down, it gets an x; Finally, if the comet seems to no longer exist, it gets a d.
The four numbers that follow convey the year the object was discovered, the "half-month of observation during that year," and the order of discovery. Finally, once those things are determined, astronomers add the name of the person (or persons) who made the discovery.
Supernovae—cataclysmic events that follow the death of high-mass stars—are among the brightest celestial fireworks. The process of finding and designating them is simple. Like normal stars, the designations describe constellations; the year of discovery and a random letter.