Perfect hash functions are hash functions which guarantee O(1) operations complexity when used in a hash table; In other words, a hash table that uses a perfect hash function guarantees that retrieving any value will take no more that some constant time, regardless of the table's size.
This is opposed to a general hash function, which may, in some conditions, require a number of look-ups that is proportional to the table's size - O(n) operations.

Coming up with a perfect hash function for a specific data set takes in the order of O(n) operations (i.e. a number of operations that is proportional to the data-set's size);
Using a perfect hash function is best at situations where there is a large dataset which is not updated frequently, and many look-ups into it. This is because updates may require re-calculation of the perfect hash.