The most simple way to get out of being someone's guarantor is for the main borrower to pay off their loan and essentially, terminate the agreement.