To hex someone is to cast a malicious spell and is not within the correct use of spiritual energy. It is a deliberately conscious direction of negative energy and is said to rebound upon the perpetrator threefold.
Psychological / emotional perspective: When we dream of being hexed we are probably being coerced in waking life to do something which goes against our own personal code of conduct.
Material aspects: To hex someone is to unduly influence a person or result. Usually this has negative connotations so to dream of having a hex put on us will signify an instinctive dislike of someone, which may or may not be reciprocated.
If we are performing such an action in dreams we probably need to take a long hard look at our motivation.