My Google search said that it was thanks to the Rosetta stone which had the same text in different languages. I can't imagine learning to read Chinese by studying a few words written in English, Italian and chinese.
The Rosetta Stone has quite a bit more on it than just a few words. The problem is that before its discoveries, scholars had no idea where to start with deciphering ancient Egyptian hieroglyphs. Then, they unearthed the Rosetta Stone in 1799, which featured not only hieroglyphs, but also the same text in Demotic (an Egyptian form of writing introduced in the Late Period) and in ancient Greek (the stone dates from the Hellenistic period, so when Egypt was ruled by the Ptolemies).
Ancient Greek, of course, could be easily read. Jean-François Champollion was able to link the Greek text to the hieroglyphs, with the names of rulers (set in cartouches) playing a central role in figuring out what the different symbols meant. Still, it took a while for the rest of Egyptian hieroglyphs to be deciphered; it's not like Champollion translated the Rosetta Stone and then everyone immediately knew how to read all ancient Egyptian texts.
For an accessible and very readable introduction to the topic, consult The Keys to Egypt: The Race to Crack the Hieroglyph Code (2000) by Lesley and Roy Adkins. For an introduction on how to read hieroglyphs yourself, you could try Bridget McDermot's Decoding Egyptian Hieroglyphs (2001), or literally any of a large and seemingly ever growing number of books written by academics that serve as a quick and easy introductions to the subject.