Fetching details from the dictionary...

Chinese courtesy name (name formerly given to adult Chinese men, used in place of their given name in formal situations)
nickname
section of a village
「字」 has other readings with different meanings.
孔子の字は仲尼といった。
Confucius's courtesy name was Zhongni.
昔の人は字を持っていた。
People in the past had courtesy names.
彼の字は知られていない。
His courtesy name is not known.