Why does Hashmap lookup be O(1)?

First of all O(1) means a fixed amount of time to do something, it can be 10 nanoseconds,15 milliseconds,30 minutes, or an hour. Similarly, O(n) means it takes an amount of time linear with the size of the set, so a set twice the size will take twice the time.

What is hashing?

Hashing is the process of converting a given key into another value(usually a fixed string of digits).