Simply put, an affiliate program is an agreement in which a business pays another business or influencer ("the affiliate") a commission for sending traffic and/or sales their way.
This can be achieved through web content, social media, or a product integration. The affiliate gets a unique link (an "affiliate link") from which clicks can be tracked - typically using cookies.
You will often come across the terms "cookie length" or "cookie life", which simply define how long the cookie will be tracking the user's online activity.
For example, if a cookie has a 30-day life, your referral needs to make a purchase within 30-days of clicking your affiliate link in order for you to get paid - otherwise the lead will no longer be trackable.