Resources, or "image resources", are blocks of data which Photoshop maintains for image documents. They are read in when the document is opened, can be accessed and changed by Photoshop or plugins, and are stored in saved files. Image resources describe things such as paths, metadata, etc. Each resource has a type, ID, name, and contents - see chapter 2 of Photoshop File Formats for details. The routines in the "pseudo-resource callback suite" are used to manipulate them.
The Photoshop API Guide (chapter 3) calls them "pseudo-resources" to distinguish them from platform resources, which accompany a Macintosh or Windows executable and are typically used to store things like user interface elements and text strings. (Platform resources are manipulated by Resource Manager or Win32 routines respectively.)
The code you quote simply enumerates all image resources of type histResource. It makes calls to read them in decreasing order of index, locking each data block in memory and finding its start address (resourcePtr), but it does nothing with the data, so I'm not even sure why it's there other than as an example of an enumeration loop. You can safely remove those lines.
Let me know if you need more information.