Typically your loan is packaged with piles and piles of other loans into a portfolio of similar loans.
The portfolio may have a face value of $100,000, but if there are increasing amounts of late payments and/or defaults, the portfolio fair value may be written down to say $80,000 because you can't say something is worth $100k when an estimate says you may only collect $80k.
Investors sometimes purchase these books of loans from the banks and assume the risk. They are speculating that the loans will perform better than to what they were marked, and thus they will make a good profit off the purchase.
Bottomline is though your loan never changes even if the ownership of that loan changes hands unless you contact the bank and do some sort of amendment.