"Recasting" a mortgage is a fairly simple concept. Say you want to pay down a chunk of loan principal and have your monthly payments reduced as a result that would be a mortgage recast. (A mortgage could also be recast because you want to extend the term of the loan because you're struggling financially the result is lower monthly payments but a longer term to repay the loan.)
You can always pay down your principal in small amounts or in a large amount simply by applying those funds to the balance of your loan. Once you do, your loan term automatically gets shorter because you owe less in total and your normal monthly payments will pay off the resulting smaller balance more quickly. But your monthly payment will stay the same throughout the term of the loan, even though the number of years it takes to pay off the loan may be reduced. If you want to pay down principal and start making a lower monthly payment, you'll need to have the loan recast.
Recasting is a form of refinancing, but typically doesn't require as much paperwork or cost. However, some mortgage companies will not be able to recast your loan if they sold the loan to other investors if that's the case, those investors may not be willing to recast the loan. In that case refinancing will be necessary.