The libretto (dimunutive Italian term for story or book) is the text of the opera to which the music is set. The great composers of 17th and 18th century opera rarely wrote their own libretti, but instead set existing texts to music.
Lorenzo da Ponte (10 March 1749 - 17 August 1838) was in my opinion the supreme librettist of all. Three of Mozart's most popular operas were settings of texts by da Ponte, including The Marriage of Figaro(1786), Cosi fan Tutte(1789) and perhaps my alltime favorite opera Don Giovanni(1787).
Interesting side note is that The Marriage of Figaro is a libretto based on a play by Pierre-Augustin Caron de Beaumarchais which was considered quite incendiary in a France which was primed for revolution. If you saw the marvelous film Amadeus, you saw a hint of that disonnance which colored the Austrian emperor's reception of an opera based on text that was giving his dear sister Antoinette some teeny bit of discomfort. Incidentally, the play showed the aristocracy to be entitled idiots unworthy of such privelege, while the servant class were quite put-upon and morally and in all other ways in fact superior to the aristocrats. Touchy subject matter!
Also worthy of note-- Mozart was Austrian, but he and the popular da Ponte were most celebrated in their lifetime in the Czech capital of Prague, which was and remains a great cultural center for the arts. Mozart was the original rock star, truly. Well deserved, in my humble opinion.
Another interesting note on The Marriage of Figaro is that this story is one of a series of three, the first installment being The Barber of Seville which was penned later(1816) by the inimitable Rossini and the final installment, The Ghosts of Versailles (1991) being composed and completed late in the last century.
from Don Giovanni - for tenor Placido Domingo 's 70th birthday gala concert, Uruguayan baritone Erwin Schrott masterfully delivers a delightful rendering of the Catalog Aria, in which the Don's servant Leporello itemizes the magnificent degree of DG's bastardy:
Below, the Commendatore's statue has come to live to call debts due on a still-defiant Don Giovanni. The scene concludes with Don Giovanni being spirited to hell by fiery demons.