Looking at 客, we should already know that it is the character created to represent meaning of guest in place of 各.
Comparing to 各, 客 is formed by adding 宀 to 各. 宀 has the meaning of "a house", while 各 has the meaning of "walking towards gate of the host". So 客 has the aggregated meaning of "come into house of the host".
To confirm our observation, let us examine its evolution history: (image get from http://www.vividict.com)
|Learn one Chinese character a day - 客|
Oracle Script of 客 - is to represent the meaning of a man () walked () into house () to be the guest.
Bronze Script of 客 - was re-created based on 各 -to make the meaning of "a guest comes over" more obvious. Modern writing of 客 is the continuation of .
客 means guest.
Now let us enjoy a Chinese calligraphy with 客 inside.