What's "Shaikh"ing

I have a question about the use of the title (or perhaps name) Shaikh (sometimes spelled Sheikh) in some Middle Eastern cultures. An example is Khalid Shaikh Mohammed, the alleged 9/11 mastermind recently captured in Pakistan. Is the title of Shaikh hereditary? Earned? Bestowed by popular acclimation? Assumed? Is a Shaikh the head of a family group such as a clan or tribe, or meerly a person of esteem? In Khalid Shaikh Mohammed’s case, is it actually his name or a title?