Fannie only bundles "conforming loans" but it is easier to stick with one type of loan for now.
Fannie Mae gives them back a "pass through certificate." (PC)
Here is the deal...
The mortgage bank continues to service the mortgage. For the effort of servicing the mortgage they take a servicing fee, off the top of all future payments that come in from the mortgage bank. This payment off the top is some fraction of the interest received.
Usually the there is some kind of insurance on the PC, the insurance can come from the originating bank, Fannie Mae, or a 3rd party insurer. They also receive a slice of the interest cash flow.
Typically, all of these fees add up to somewhere around 0.50% to 1%
The rest of the interest and 100% of the principal cash flow goes to the holder of the PC.
For example, if the bank issues a new mortgage at 4.625%. 0.35% might go to guarantee fees, and 0.275% to servicing fees, and a 4% to the PC holder.
The mortgage bank then sells the PCs to a Wall St. investment bank as an intermediary, who then sells the PCs to the final investor. These investors could be big banks, insurance companies, Fannie Mae, or some sort of fund.
The investment bank earns a spread for this transaction. That is, they try to sell the PCs for more than they paid for them... typically the markup is ~ 0.05%... not very big, but the mortgage market is huge. I big time I bank could be trading $1 billion of MBS in a day. 0.05% of 1 billion adds up pretty fast.
Now it could be that the PCs go through another stage of intermediation. It could be that the PCs go into a CMO (Collateralized Mortgage Obligation)
The CMO is a trust that takes in the cashflows from the PCs and pays it out to different investors depending on some sort of pre-arranged order of priority. There could be many classes of investor, but I will simplify it to say that one class of investors has a lower-risk lower-return slice of the pool and the other investors have a higher risk, hopefully higher-return slice.
If the MBS go through the CMO machine, the investment banks get another set of payments for their work in structuring and selling the deal.
I know that this is some complicated stuff, but I hope that this makes things a little bit clearer.
I agree broadly with the answer from xyzzy. from an investor perspective, they hold a bond, the MBS is just like any other bond. Depending on the specifics of that MBS they will get periodic payments of interest and principal.
Investing in MBS is a complex subject. I suggest reading textbooks by Fabozzi, and others. On top of having the money to invest, you should be well versed in mortgage related investing, including the effect of prepayments, tranching, duration and convexity, etc. If you don't understand these terms, you are at least a year away, with lots of study, from investing in these securities.
I don't understand the process of trading mortgage-backed securities.
When the investment bank collects the pools of mortgages and offers them to investors, how exactly is this done? Do investors simply own those pools of mortgages, or do they own shares which represent those pools of mortgages?
What do those pools of mortgages represent to the investors?
Also, does the investment bank make a profit from the cash flow from the mortgage borrowers?