An affiliate agreement is a contract between a company and an affiliate that outlines the terms and conditions under which the affiliate will promote the company's products or services in exchange for a commission on sales or leads generated. It typically covers details such as commission structure, payment terms, marketing guidelines, and the responsibilities of both parties.