XYZ Interview Question

What is a hash function and how order of 1 is maintained?