Can I make money by posting affiliated links of Amazon or others?

Hello friends!

I just joined this world and I have the impression that it's possible to make money by going to Amazon and get some affiliate link of the items and then post it in the web and make money if someone click it and buy it.

Does it work like that?

If so, what other websites like Amazon have this affiliate link to items?

eBay??

Thanks!!