The mere possibility of doing this exhaustively is a much debated issue, because even among humans, it is very difficult to agree on a set of senses for any given word.
if we consider it possible to obtain a list of the senses, even if it is incomplete, then it can be acquired from human knowledge (as one can find in any good dictionary), or from automatic discovery, a task which is generally called Word Sense Induction.