the batteries (both the 12v lead-acid and the hybrid NiMH) work best when they're at what humans would consider comfortable room temperature.
charging of batteries (working them) makes them heat up (like you would heat up if exercising)
So, the Prius has vents in the passenger cabin (rear deck on the 2001-2003 classic Prius, to the side of the rear seats in the 2004 Prius) to suck in passenger cabin air to help cool the batteries. (The passengers in the cabin will probably use the AC or heat if the temperature is uncomfortable, might as well use their air). There is ductwork that runs from the rear of the car, over the batteries, and vents out the trunk/cargo area of the Prius and additionally out of the vent on the side of the classic Prius. If the temp is still out of range, there is a small fan that'll help circulate the air over the batteries. Occasionally you'll hear it on a hot day. Normal, nothing to worry about.