It all begins when a borrower takes a mortgage from a lender. The lender will process the loan according to the guidelines and regulations set by government-sponsored enterprises like Fannie Mae and Freddie Mac.
The lender or the originator will package similar types of loans in one bundle and will decide if they want to service them for some time or sell it in the secondary market.
The government-sponsored enterprises Fannie Mae and Freddie Mac will purchase these bundles from multiple lenders and will bundle them into mortgage-backed securities.
Fannie Mae and Freddie Mac hold the MBS for all conventional mortgages. The same process is followed by Ginnie Mae for all the government mortgage loan programs like FHA, VA, and USDA.
These mortgage-backed securities are purchased by investors from government-sponsored enterprises like Fannie Mae, Freddie Mac, and Ginnie Mae.
The investors see a consistent money flow in these mortgage-backed securities as the borrowers make regular payments for the mortgage.