A Messier object can be a nebula, a cluster or a galaxy. The criterion is that they must all be visible from Earth with only a modestly sized telescope - some even with the naked eye. They can all also be termed "deep-sky objects".
Back in the middle of the 18th century, French astronomer Charles Messier was operating, his prime remit being to search for comets. Time and time again, he thought he'd found one, only to discover on closer examination that it was nothing of the sort. The object would turn out to be a nebula, a globular cluster or a galaxy. Eventually he became so frustrated with this, he decided to catalogue each one of these "false alarms", to satisfy himself and also to help his contemporaries not make the same mistakes as he had.
Thus, in 1771, the first list of Messier Objects was published - at that time numbering 45 and designated M1, M2 etc. He subsequently added more, bringing the total to 103. Other astronomers were able to contribute to the list, too, so today, the total stands at 110.
As galaxies are dealt with elsewhere on this site, this page will offer you click-throughs to more information on the other two types of Messier Objects.
Essentially, these are clouds consisting of dust or ionized gases.
Collections of stars that are connected in some way.
In 1786, British astronomer William Herschel (famous for discovering the planet Uranus) published his "Catalogue of Nebulae and Clusters of Stars". Over the following 16 years, he added more candidates to it, so the total ended up being 2,500. Objects are depicted as belonging to this list by the letters CN.
In 1864, William's son John expanded on his father's list, producing what was then termed the "General Catalogue of Nebulae and Clusters and Clusters of Stars", containing no less than 5,079 objects, designated GC.
In 1888, Danish/Irish astronomer John Dreyer built on John Herschel's list to produce his "New General Catalogue of Nebulae and Clusters of Stars", abbreviated to NGC. This contained 7,840 objects. He later published two "Index Catalogues" (IC), which were essentially supplements to the original list, adding a total of 5,386 more.
Even though it was extremely comprehensive, it was found to contain many errors and, over the decades, various steps have been taken to try and correct it. The most recent attempt, by Wolfgang Steinicke in 2009, is considered the best version so far. His list is called the "Revised New General Catalogue and Index Catalogue" and is abbreviated as RNGC/IC.