The term you are looking for is “money laundering”, the art of turning illegally acquired money into legal-looking money that you can put in a bank account, pay taxes on, and yes, pay your mortgage with.
As a simple example, I go to school and sell my lunch instead of eating it. But my parents would get suspicious of me having extra money. So I go out babysitting and tell my parents that I’m getting paid more than I really am, and voila, they think my extra money is legitimate.
As a less simple example, I sell drugs, but I also run a popular restaurant. Wow, there’s always a lot of money in the tip jar, and when customers pay cash I sometimes forget to subtract the value of their coupons from the till. Voila, extra “income” I can report to the IRS.
Latest Answers