If someone dies and owes money to the IRS, the Executor (the person who takes responsibility for the deceased person's estate) is then responsible for collecting and arranging for payment of debts of the estate (not with their own money though!).
It is the money in the estate that must be used to pay off the person's debt. If, however, the deceased person does not have any money in the esate to be able to pay off the tax liability, the debt DOES NOT transfer to the Executor UNLESS there was a joint liability with the deceased (if the Executor is the widow or widower of the deceased, and the two had filed joint returns, the liability will be assessed to the Executor). Otherwise, the Executor will need to contact the IRS, provide a death certificate and evidence that the estate is unable to pay off the liability. The debt should then be canceled once and for all.
For information on claiming a refund for a deceased person, you'll need to file a Form 1310. You can visit the following link to the IRS website for more information: