AIG announced (.pdf) today how it intends to eventually escape government control. Its bailout was easily the most complicated of any other financial institution, so it should come as no surprise that its exit plan is also very complex. Here's the CliffsNotes version.
AIG got money from two places: The Federal Reserve Bank of New York and the U.S. Treasury. Let's start with the NY Fed.
The NY Fed
The NY Fed bought a slew of bad assets from AIG, close to $40 billion worth. Forget about those; for now the NY Fed is just keeping them. They aren't part of the exit plan. Their performance will determine if the NY Fed makes or loses money on the purchase.
But the NY Fed also provided AIG with money from two sources: a loan and preferred stock. The firm still owes $20 billion for the loan and $26 billion in preferred stock.
The $20 Billion Loan
AIG has some money on hand and will get some more through selling off divisions. That's what it will use to pay the $20 billion loan back. This is the easy part.
The $26 Billion Preferred Stake
The firm will gather up another $4 billion of its own money through asset sales to cover a portion of that $26 billion. The other $22 billion will be covered by the U.S. Treasury, which will increase its balance of preferred AIG shares to around $70 billion.