HashMap stores data in key-value pairs.
It calculates the hash code of the key.
It uses the hash to identify a bucket.
It stores the entry in that bucket.
If collisions occur, multiple entries share the bucket.
In modern Java implementations, heavily collided buckets can be converted into balanced trees under suitable conditions.