First of all the book is much better than the movie, but it will help if you've seen the movie beforehand. This is basically an essential reading for "How the world actually works" series.
Joint stock companies meet Investment banking
Author Michael Lewis talks about how the investment bankers started to convert their companies to public joint stock companies back in the 80's. This was the required first step to create this huge mess back then. Investment banking (you can read it as gambling banking as well) has transferred its risk from the people who actually owned and worked in them to the stock holders and thus creating the first step of this Ponzi scheme.
Creation of Collateralized Debt Obligations
Another milestone in this meltdown was the creation of financial asset type called Collateralized Debt Obligation (CDO for short). This is a new type of bond where investment bankers collected shitty Mortgage debts (would be rated as BBB as its credit score (which is the worst credit score there is for these things)) into new loans which are rated AAA by the ratings agencies. These loans are then packaged into more loans and the list just goes on and on. There's an insurance for these loans called Credit Default Swap (CDS for short) that pays huge sums to the owner if these loans are defaulted at some point.
The book shows us how the ratings agencies such as S&P, Fitch and Moody's are a bunch of losers and how they accept to be bullied by the big Wall Street firms to rate these shit loans I mentioned above to as the safest rating with AAA. AAA literally means that your loan is as safe as the Treasure bonds of the United States government. This crucial joint offence meant that whoever bought the CDO's could just specify them in their accounts as risk free 5% interest creation machines. Thus, one of the worst risks in financial world got the veil of the utmost safety.
So with these mechanisms in place, say a farmer with an income of 14000 dollars a year could take out a home loan of 750000 dollars in the 2000's. With the interests rising after a few years of teaser rates period, one can imagine the return of these investments. CDO's and CDS's enable the financiers in Wall Street to sell these loans multiple times to each other, to insurance companies, to investment banks, to hedge funds, to pensions funds, basically to all the suckers out there thinking that these loans are the safest bet with the greatest interest rates. It came to a point that biggest investment banks forgot that they created this Ponzi scheme and started buying these loans as safe investments themselves!!!
There's literally no virtue in this game. There are just some people out there who came to the realisation that these debts are going to default at alarming rates because they are poorly rated. And they bought insurance for these debts (remember the credit default swaps). And this is why the book is called The Big Short. To be fair, these are not bad people and some of them tried to warn the system before all this happened. But they all got enormous amounts of money after all this anyway.
Government to the rescue!
So when it all went down between 2007 - 2009, what happened? US Government of course intervened and try to stop this disaster. People were really afraid that the markets would stop, and then banks would stop, and then people would run out of credit and the whole society might come tumbling down. Government let Lehmann Brothers to go bankrupt and it made everything worse. Then they produced the notion of "Too big to fail". With this ideology, US government basically handed out billions of dollars to these big banks (they could just as easily give the money to the lenders - actual people who desperately needed the money to pay their debts - but they didn't give the money to the people - makes you wonder, why not?). At one point they actually paid 700 billion dollars to Citigroup without making any changes to its management etc. Apart from an odd couple of bankers, no one went to jail and almost everyone involved in this trade (be it losers or winners) are allowed to keep their money (everyone got around tens of millions of dollars in those times). Government never made any vital changes to the way financial markets work (at least by 2011 when the book was written) and this ticking time bomb of greed and financial engineering continue to live to this day! So basically it's socialism for the capitalist when they need free money and free market to the rest of us plebs! In Wall Street parlance, "We're fucked!".