In the Object class, hash codes correspond to 32-bit internal JVM address of the object in memory. In the String class, hash codes are calculated using an algorithm where two Strings with the same contents will always have the same hash code. In both cases, an effort is made to distribute the hash code values across the 32-bit spectrum. I'll explain the importance of this below.
The basic contract of any hash coding algorithm is that if two objects are to be considered equal, they must share the same hash code. Therefore if two objects have different hash codes, you know they are different. Java's built-in Collections classes often use this trick in order to speed up performance. You can also compare hashCode values in your own code.
But the primary use I have for hashCodes is the java.util.HashMap and java.util.HashSet classes. Because hashCodes are evenly distributed, these maps and sets can use the hash code to distribute objects placed in them across an array. Later, when objects need to be looked up, the hash code can be used to find the location without requiring any looping or other iterations. Such algorithms are highly regarded for their performance in larger systems -- so the HashMap is very popular due to its use of hash codes.
For a more technical explanation, you might want to read this: http://mindprod.com/jgloss/hashcode.html
Hope this helps!
Adobe Systems, Inc.