HashCode is a function used in hash tables.
You can see this for a good example and explanation :
http://www.sparknotes.com/cs/searching/hashtables/section1.html In
Java, hash tables are used for HashSet, HashMap, ...
The hashCode() function need to be defined in objects you want to store in a collection implementing a hash table, such as HashSet, ...
For a good way to implement hashCode(),
you should look at Effective java Programming Language Guide, Item 8.
For a tutorial on Collections in Java, you can look at :
http://java.sun.com/docs/books/tutorial/collections/index.html