Here is how the scheme worked.
Banks bought up all these sub-prime mortgages.... then they repackaged them into CDOs mixing some good and some bad mortgages. CDOs are basically collateralized debt obligations which are asset backed securities, in this case mortgage backed. Now the CDOs that were created were sold back and forth and treated as ASSETS instead of debt (mortgages are debt) because they slapped on the AAA rating that AIG had as an insurer. So AIG essentially is insuring a whole ton of CDOs by engaging in CDSs (credit default swaps).
Now the housing market fails, people go into forclosure.... the CDOs are now worth PENNIES on the dollar..... and no one wants to buy them.
SO
AIG is effected because it makes payouts when bankruptcy and defaults occur... it has to by law, its an insurer. So when it runs out of cash, it cannot operate.
The banks fail because they can no longer sell their CDOs because they are worthless (extremely risky, worth pennies on the dollar) so that causes write downs and further drains cash from the banks.
Does this make sense? And this is only the begininig.