Amsterdam's many hofjes - or almshouses - were mostly built by wealthy merchants and benefactors in the 17th and 18th centuries to offer cheap or free housing to underprivileged groups, usually poor and elderly widows. There are lots in the Jordaan although there are others sprinkled throughout the city and along the Amstel river. Today they are mostly run by foundations, and still offer cheap accomodation.
It is up to the residents to decide whether or not to leave the door open and allow the casual visitor a look inside. If you can go in, you should enter only two or three at a time and respect the quietness and privacy of those living there. I've put some of those which are open or semi-open to the public as separate listings.
You can find photos of hofjes on the Jordaan web under 'courtyards'.