Lithography is one of the few arts where we know 1) when it was invented and 2) who invented it. That honor goes to Alois Senefelder, a German actor and playwright, who in either 1796 or 1798 (it varies with the source) was trying to develop an inexpensive method for making copies of his plays. Metal engraving was too expensive and setting type by hand also expensive and slow. So Alois was trying to see if he could use the (then) ample and inexpensive Bavarian limestone as the printing plates. He thought if you could write with some medium that would act as a protective "mask" and then etch the stone down, the writing would be elevated above the background. Such a "relief" block that could be inked and used to run off copies.
It worked sort of, but not really. The acid tended to undercut the protected areas and raised letters created could break under the pressure of the press. But one day, as Alois tells it, his mother asked him to go do some shopping. Having no paper immediately at hand, he just jotted the list down on one of his limestone blocks using a wax crayon. Then after he found some paper and copied the list, he got ready to go back to his experiments.
Alois washed away the list on the stone but then noticed that if he inked the still damp surface, the ink only stuck to where he had made the writing. The blank areas "rejected" the ink. He found that you could indeed make a print of the text. This was all the more amazing since unlike in etchings or relief printing, the writing and background were of the same height.
Unfortunately soon Alois realized that the image itself wasn't stable. So he needed some way to "fix" the image to the stone so you could make multiple inkings and printings.
Briefly put, he found you once you wrote the text, then you coated the surface with dilute nitric acid in gum arabic (the "medicinable" gum of Shakepeare's Othello). Then even if you rinsed the drawing off with a solvent, when the stone was wetted and inked (again with an oil based ink), the text returned and could be used to print hundreds or even thousands of copies.
Later Alois experimented with drawing on a gelatine coated paper. Then if you lay the paper face down and ran it through a press, the drawing was transferred to the stone. The image could then be treated with the acid and gum arabic just as if you had drawn it on the stone directly. So you didn't need to write backwards. Alois found you could make prints of printed texts, copies of manuscripts, and even sheet music.
But the big plus was that you could print not only just black and white, but an almost infinite variety of intermediate tones - today called "gray scale". So you could make copies of highly realistic drawings, and later in the 19th century it was found you could also adapt the method to make copies of photographs. Finally by using multiple blocks, you could make color prints. With lithography illustrated books became one of the most popular forms of entertainment.
But the more curious wonder just what the heck is going on when you make a lithograph. Just how does it really work? Well, perhaps the following explanation will suffice. It goes into more chemistry than you find in most books, but it is also simplified to the point that mineralogists may go into spittle flinging diatribes about how that's not the way lithography really works.
So if you want, you can read an explanation that is at least true enough. That is, you can if you just click here.