Welcome to javaranch. This question has been asked here before. In fact if you do a google search - "hashset vs hashmap" it will link you to several discussions here. You can also use the search feature in this forum to search for previous posts.
A set is a (flat) collection with unique elements. A map is a dictionary; a mapping from keys to values. You can't really compare the two.
And then I contradict myself; you can most definitely compare them. The reason you can is because, at present, a HashSet actually uses a HashMap. It basically delegates its storage to a HashMap - the keys are the Set elements, and the values are irrelevant. The following are taken from the HashSet implementation:
Now they use one single object for all values, but like I said, it's irrelevant. By ensuring that no element has a null value, add and remove could have been written as this:
Using a static object is more efficient though.
So if you would ask what the difference is between a HashSet and the keySet() of a HashMap(), the answer would be: just about nothing.