Morgan Stanley Interview Question

Explain how a HashMap works.