A madrassa is a sort of community centre attached to a mosque. They used to be quite common all over; they're much less common today. They might have kitchens, schools, open areas for meetings - all the stuff a community centre might have. There are still a couple of them in Islamic Cairo, though I have no idea if they're open (I don't believe they are, as they have Tourism Dept. plaques on them marking them as monuments). We visited a couple today after we found our goal, the textile museum, right as it was closing.