If you've never seen one of these fruits before, I very much doubt that you're alone, because they're not often grown these days - although now that there's a revival of interest in heritage crops, it's becoming easier to find them. They're native to the Balkans and the Middle East, and were probably introduced to Britain by the Romans.
They used to be popular because they stay on the tree deep into the autumn, remaining hard and inedible until after they've been frosted, or 'bletted', when the skin wrinkles and the flesh softens and browns - and this is when they're eaten, either raw or cooked into a sauce or a paste. Their fall from grace probably happened because tastes change, and most of us are squeamish these days about eating something that appears to be rotten.
My own knowledge of the medlar is entirely theoretical - in fact, when I first noticed this small tree in the RSC's Avonbank Garden in Stratford a couple of winters back, I wasn't sure what the fruit were; but I took a guess, and a photo, and when I got home I looked up the medlar and found that my hunch was right. I was moderately tempted to wait until they were bletted and then pick one and try it, but I didn't because the tree and the fruit belong to the theatre (I don't scrump other people's apples, either!), and because I assume that they're a valuable winter food source for the wildlife in the Garden.
As to why the RSC has a small medlar tree on its property, I have no theory, other than that the medlar is mentioned several times in Shakespeare's plays - usually in quite coarse terms, as a metaphor for a bodily orifice, or a fallen woman. This small park contains several unusual trees and shrubs, in fact, and it would be quite interesting to find out its history, and whether it has been deliberately planted with things that are referenced in the works of Shakespeare.
If you're not already bored with medlars, there's a nice piece here by Nigel Slater, which includes a recipe for medlar jelly.
I'm posting an extra today, of the the light falling rather prettily through the autumnal trees in the church yard of Holy Trinity - which is Shakespeare's church, of course, and right next to the Avonbank Garden.