When two keys produce the same hash, they collide and are stored in a linked list within the same bucket. This can affect performance, so it's crucial to ensure a good hash function. In Java 8+, if the list gets too long, it may be converted to a balanced tree.