I don't know what I was thinking, maybe something like sodium pentathol and unfriendly interrogations... but I was surprized to read that a TS Clearance background investigation is about the same as a background investigation for a police officer applicant including the Polygraph.
The purposes of each are essentially the same; they try to establish good moral character, loyalty, reliability, responsibility, and good mental health - for the purpose of either upholding the laws of the country in one case, or protecting information critical in varying degrees to national security in the other.
One difference is the paperwork you sign if you are recommended - paperwork that, in the case of a security clearance, puts you on the hook, and the indoctrination/education you would get specific to what it means to reveal classified info and the consequences. And of course, for the clearance, a need for it must first be demonstrated.
either way, they're going to be talking to your ex-wives, looking into your sibs and other relatives, they will be looking at your crim history, drinking and drugging habits, medical/mental records, driving record, psych exam, Polygraph, credit history, tax returns if necessary, religious beliefs, memberships in organizations, politics, education, all records of discipline and evaluations in any job or military service you've had, talking with your neighbors in every place you've lived above the age of 7, anything that could relate to your character.
Many people here would easily qualify for Top Secret Clearance if there were a need.