A hash set stores only keys, while a hash map stores keys paired with values. Both use the same hashing machinery to place and find entries fast; the difference is what each slot actually holds.
A set answers one question: is this item present? You add values and later ask whether something is in the collection. A map answers a richer question: what value is associated with this key?
seen.add("alice"); // set: membership only
ages.set("alice", 30); // map: key -> value
Reach for a set when you only care about presence or uniqueness, like tracking which items you have already processed. Reach for a map when each key needs an attached value. Under the hood, a set is often just a map with dummy values.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.