Go take a macroecon course and then come back.
Countries invest in US debt because it is safe. We have never defaulted on an obligation. Furthermore, the yield on bonds is at an all time low. Because of tumultuous european markets (among other reasons), their yields have gone up while yields on US bonds have gone down. Essentially what this means is that it is cheaper than ever for the United States to borrow money.
Social Security (OASDI) is an entirely different, but related animal.
For that I defer to Khan Academy. http://www.khanacademy.org/humanities/american-civics/v/social-security-intro