According to NASA, the temperature of a black hole with the mass of the sun is only one ten-millionth of a degree over absolute zero. Scientists determine this by measuring the temperature of the radiation that comes from a black hole.
Even though the temperature within a black hole itself is extraordinarily cold, it can be surrounded by extremely hot materials. A black hole pulls gas and other materials into its gravity well at velocities approaching the speed of light. As all of this material rubs together, friction is created, generating temperatures up to hundreds of millions of degrees at the perimeter, or event horizon, of the black hole.