i co-sign for a loan the person that i co-sign for defaulted .the collection agency said if i paid them a lump sum they would release me from this debt
Generally, yes. A co-signor is a "guarantor" under the law, which means a creditor or their agent can collect against the co-signor on the debt if the original debtor defaults. Because the co-signor is on the hook so to speak, it is common for collection agencies to settle with the co-signor (and recover some money on the defaulted debt for the creditor) by offering deals like this.
Remember, it is important to (1) VERIFY that the debt is valid and (2) REQUEST WRITTEN CONFIRMATION that the agency is the lawful agent of the creditor and is allowed to make such deals and (3) OBTAIN A WRITTEN RELEASE if you choose to take the deal.
Christopher R. Minelli
Minelli Law Offices, LLC
NOTE: This answer is not intended to be legal advice and should not be construed in that way. This answer does not create an attorney-client relationship and no such relationship may be created absent a signed retainer agreement. The author is licensed in Illinois only, and his answer is for educational purposes alone.