Morgan Stanley interview question

Explain how a HashMap works.