Start here. This is the direct spoken answer to practice first.
Overview
A useful explanation connects the public key contract to the lookup process and its common failure modes.
A HashMap uses a key's hash to select a bucket, then compares candidate keys in that bucket using equality. A good hash distribution keeps buckets small, so get and put are expected constant-time operations. Collisions are valid because different keys can have the same hash; equality distinguishes them. If two keys are equal, they must produce the same hash code or lookup can search the wrong bucket.