Musikaar interview question

How does HashMap and HashSet works?