To become an affiliate, first you have to join a program. A lot of online companies offer this. Second, you have to build your site. For instance, you've chosen to be a pharmacy affiliate. You can build a site that is health-related. Then use the text links that is provided by the affiliate program. You could also add in a few banners or product feeds to your site.
Each time a customer clicks on the banner, it directs them to the company that you're affiliated with. You earn commission if you make a sale via this referral.
To ensure your success as an affiliate, you can market your website online. The more people visit it, the better your chances of earning.