The Olden Days
In the "olden" days, when someone wanted a home loan they walked downtown to the neighborhood bank or savings & loan. If the bank had extra funds laying around and considered you a good credit risk, they would lend you the money from their own funds.
It doesn’t generally work like that anymore. Most of the money for home loans comes from three major institutions:
You talk to practically any lender and apply for a loan. They do all the processing and verifications and finally, you own the house and now you have a home loan and you make mortgage payments. You might be making payments to the company who originated your loan, or your loan might have been transferred to another institution.
The company you make your payments to very rarely owns your loan. They are the "servicer" of your mortgage. They are called the servicer because they are simply "servicing" your loan for the institution that does own it.
You see, what happens behind the scenes is that your loan got packaged into a "pool" with a lot of other loans and sold off to one of the three institutions listed above. The servicer of your loan gets a monthly fee from the investor for processing payments and taking care of your loan. This fee is usually only 3/8ths of a percent or so, but the amount adds up. There are companies that service over billions of dollars of home loans. Three-eighths of a percent on a billion dollars is a tidy income.
In fact, mortgage servicing is where lenders make the real money. The entire system of originating mortgages, including wholesale lenders, mortgage brokers and mortgage bankers is designed so that servicers get loans into their portfolio -- hopefully at a "break even" level -- but often at a loss. Mortgage servicing is where they make their profit.
Once your loan has been packaged into a pool and sold to Fannie Mae, Freddie Mac, or Ginnie Mae, the lender gets additional funds so they can make more loans (to service in their portfolio) and sell to those institutions, so they can get more money, and so on....
This is the cycle that allows institutions to lend you money.