You have to sign up with affiliate programs (merchant) and get the link with your id (affiliate link). Then you can publish affiliate link on your personal website, blog, forum, social media sites.....
There are a lot of affiliate programs and of course, including spams. So I suggest that you start with well known sites like Amazon, Best buy, Lowe....
https://affiliate-program.amazon.com/
http://www.bestbuy.com/site/Global-Promotions/Best-Buy-Affiliate-Program/pcmcat198500050002.c?id=pcmcat198500050002
http://www.lowes.com/cd_Become+a+Lowes+Affiliate_1299698460_