Infosys Interview Question

How HashMap works in general?