Medlars are the fruits of shrubs (also called medlars). They are rarely eaten these days, being unsuitable for commercial distribution because the flesh must rot to a brown colour before they are edible.
These were growing in or fallen off a shrub in the RSC Gardens by the river in Stratford on Avon. There are medlars in various Shakespeare-related places in the town, doubtless because they get mentioned in four of his plays.