Pregunta de entrevista de Atypon Systems

How does a hash function works? What happens if 2 records have the same hash?