Pergunta de entrevista da empresa Virtusa

How does hashmap work? how does it find the index of a key?