Leonard of Quirm is not so much old as old-looking - his head has risen up through his hair like the dome of a mountain, and he's one of those fellows who gives the impression of being an absentminded old fellow regardless of his actual age.
He lives in the Patrician's Palace at Lord Vetinari's expense, and in secret. Oddly enough he doesn't regard this as imprisonment - if anything, he's grateful that Lord Vetinari provides him with a nice studio, plenty of working material, and fresh laundry, and keeps him safe from the people who want to take his world-improving inventions and use them for truly unpleasant purposes.
Leonard, you see, is a genius. And an inventor. But he's the sort of fellow who can sketch the flight of birds next to the plans for a weapon that blows up mountains. Not, of course, that he thinks anyone would use such a weapon - surely not, it would be so horrible that nobody would ever go to war again.
He can invent without even meaning to (he sometimes draws diagrams in his sleep), but is phenomenally naive about human nature. He also is completely unable to come up with names for his creations.
For the Patrician, Leonard is that most precious of things: a confidant. He doesn't understand politics in the slightest, and has no interest in Ankh-Morpork, and as such the Patrician can talk to himself while Leonard listens. He also occasionally performs useful services for the Patrician - decoding messages, creating new cyphers, that sort of thing.