Morgan Stanley interview question

How HashMap works in Java?