The structural difference is which document carries the signature. A cosigner is a party to the borrower's own credit agreement. A guarantor is a party to a second agreement, running from the guarantor to the creditor, whose subject is the borrower's debt. That difference explains where each is usually found: a cosignature suits consumer lending, where a lender wants a second obligor on one simple instrument, and a guaranty suits business lending, where the borrower is a company and the lender wants a human being behind it.
The order of recourse is the question everyone asks, and it does not have a general answer. Whether a creditor must try the borrower first, or may demand payment from the guarantor immediately, is fixed by the words of the guaranty and by the contract law of the state that governs it. Regulation B is instructive on this precisely because it declines to rank the roles: 12 CFR 1002.7(d)(5) permits a creditor, where "the personal liability of an additional party is necessary to support the credit requested", to "request a cosigner, guarantor, endorser, or similar party", listing four roles in one breath without saying that any of them is reached later than another. The useful thing to do with a guaranty in hand is not to look up what guarantors generally owe; it is to read the document for what it says about when the creditor may demand payment and how much.
For consumer credit the FTC rule largely dissolves the distinction, and that is the practical payoff. 16 CFR 444.1(k) reaches "any person whose signature is requested as a condition to granting credit to another person, or as a condition for forbearance on collection of another person's obligation that is in default", excludes a spouse whose signature is required only to perfect a security interest under state law, and then adds the sentence that settles most arguments: "A person is a cosigner within the meaning of this definition whether or not he or she is designated as such on a credit obligation." So on a consumer obligation, signing a document headed "Guaranty" does not put a person outside the rule that governs cosigners. The rule's mandated notice makes the same point from the other side, since its first sentence tells the reader "You are being asked to guarantee this debt." Published material on cosigners carries that notice in full, including what it says about when a creditor may collect.
The scope of the Credit Practices Rule is worth stating as what the regulation contains rather than as what it leaves out. 16 CFR 444.1(a) and (b) define "lender" and "retail installment seller" as persons engaged in those businesses "within the jurisdiction of the Federal Trade Commission", and 16 CFR 444.5 lets the Commission switch off a provision in a state whose own requirement gives protection "substantially equivalent to, or greater than" the rule's. If no notice appears, the productive question is what the document you are signing makes you liable for.
Regulation B's inclusion of guarantors is narrower than it reads. 12 CFR 1002.2(e) makes guarantors "applicants" expressly "For purposes of § 1002.7(d)", the paragraph on signatures of spouses and other persons. It does not make them applicants for the rest of Regulation B. The limitation is easy to read past, and it matters, because the protections that attach to being an applicant elsewhere in the regulation do not follow automatically.
There is one federal rule that requires a guaranty outright, and it is quotable. 13 CFR 120.160(a), headed "Personal guarantees", provides that "Holders of at least a 20 percent ownership interest generally must guarantee the loan," and that "When deemed necessary for credit or other reasons, SBA or, for a loan processed under an SBA Lender's delegated authority, the SBA Lender, may require other appropriate individuals or entities to provide full or limited guarantees of the loan without regard to the percentage of their ownership interests, if any." Two things to notice. The 20 percent threshold is a floor for who must be asked, not a ceiling on who may be, and the second sentence contemplates limited guarantees as well as full ones, which is a reminder that a guaranty can be capped by its own terms.
One place a guarantor is protected rather than exposed. 18 USC 891(3), in the federal chapter on extortionate credit transactions, defines "debtor" to include "any person who guarantees the repayment of that extension of credit, or in any manner undertakes to indemnify the creditor against loss". A guarantor threatened over someone else's debt is inside that criminal prohibition on the same terms as the borrower.