Refinancing makes sense when market rates have fallen since the loan was obtained or when the borrower's situation has improved—income has increased, credit history has improved. The new loan closes the previous one, and servicing continues under new terms.
The benefit is not determined solely by the difference in rates. You need to account for application costs, commissions, possible insurance, and for secured loans—collateral reassignment. Another factor: with an annuity payment scheme, payments at the beginning of the term consist mainly of interest, so refinancing near the end of the term saves little even with a noticeably lower rate.
A common mistake is evaluating the result by the size of the monthly payment. It decreases even simply due to extending the term, while total overpayment increases. It is correct to compare by the total cost of credit and by the sum of all remaining payments.
Practical condition: refinancing is available to borrowers without payment defaults. When difficulties have already arisen, it is not refinancing but restructuring, and you should contact the bank before violating the payment schedule.