Quite simply, you join an affiliate program to promote other people’s products. You choose which products you want to promote, and for each one you get a unique affiliate URL.
When you send traffic to that unique URL, you are tracked as being the affiliate.
You get credit for each sale made, earning you a commission.