<ul data-eligibleForWebStory="false">HashMap uses an array of buckets where each bucket can hold one or more key-value pairs.When inserting a key, its hashCode() is calculated to find the index in the array.Collisions are resolved by storing keys in a linked list or Red-Black Tree if entries grow beyond 8 (Java 8+).Searching in HashMap involves using the hash to locate the correct bucket and checking entries with .equals().