If the visitor buys a product the vendor pays you a commission. Fixed fee per sale. Fixed fee plus a percentage of sale. Pay per view. Pay per click.
Some merchants have tier systems.
Most programs require you to have a website already on line, and ready to be reviewed, before acceptance into their program. Associates is free to join and easy to use. It is better to join 1 to 3 Bigger Programs that offer links to multiple businesses. When you earn 2.00 in one program and .50 in another, 5.00 in another, you spread yourself thin and may not get paid for many months. It is usually recommended that you have around 500 visitors a month to your web site.