Infosys interview question

how hashmap works?