Anyone (a Merchant) with a product or service for sale or
otherwise, gets someone else (an Affiliate) to promote that
product or service. Once the Affiliate has accomplished what
the Merchant has in mind, the Affiliate receives a prearranged
commission or fee for the accomplishment. This relationship between the Merchant and the Affiliate is established by a contractual agreement between both parties.
The Affiliate is responsible for promoting the product or service in a manner which complies with the guidelines of that contractual agreement. The Affiliate is not an employee. The Affiliate is an Independent Contractor.
The Merchant is responsible for keeping up with the sales of the Affiliate and disbursing the commissions and fees accordingly. In most cases the Merchant is also responsible for the handling and distribution of the product or service as well as dealing with Customer and Affiliate relations.
For additional insight into how does affiliate marketing work, take a look at "What Is An Affiliate Program."