"Whoever alleviates [the situation of] one in dire straits who cannot repay his debt, Allah will alleviate his lot in both this world and the Hereafter." [Muslim]
Relieving one's debt is an act that is beloved to Allah - and has obvious implications for the strength of the community. There are basically two ways by which one can relieve a person's debt and gain the blessings mentioned in this hadith. First, the loaner can wait until the impoverished debtor has the means to repay the debt. In fact, this is an obligation commanded by Allah. It is not right for a Muslim to demand money back from a person who sincerely cannot afford to pay back [Quran 2:280].
A second option is to reduce the debt or to forgive the debt completely. This hadith also includes giving the debtor charity or a gift to help pay off the debts. One may also extend another loan to the debtor so as to pay off the current loan and have more time to pay off the new loan.
There are numerous hadith related to this topic that also demonstrate the emphasis that Islam places on such behaviour among people. For example, the Messenger of Allah (peace be upon him) also said, "There was a trader who used to give loans to the people. If he noticed that one was in straitened circumstances, he would tell his boy [working for him], 'Excuse him so that Allah may overlook [and forgive our sins] for us.' Therefore, Allah overlooked [his sins] and forgave him." [Bukhari, Muslim]
Al-Bukhari and Muslim also recorded that the Prophet stated, "A man died and he was spoken to [about his deeds] and he said, 'I used to have business with the people and I would give time to the rich to repay and reduce the debt of the poor.' Therefore, he was forgiven."
The Prophet also stated, "Whoever would be pleased to have Allah save him from a distress on the Day of Resurrection should then relieve one in straitened circumstances or completely remove his debt." [Muslim]
Al-Qari points out that the reward for this kind of act is true regardless of whether the debtor was a non-Muslim or a Muslim.
"Commentary on the Forty Hadith of al-Nawawi" - Jamaal al-Din M. Zarabozo, pp. 1316 - 1318