How do affiliate programs work? Basically, you apply to join the merchant's program. Once approved, you get access to special links to put on your site. (Some programs allow you to go directly to the merchant without having a website, but that varies from program to program - always read the program terms!) If someone clicks through on your link and takes some predetermined action (buys something, makes a reservation, fills out a lead form, etc.) you get commission for it. Travel programs usually give you access to a form where visitors can search hotel availability, flights, car rentals, etc.
As for how well it works, it depends. There are honest merchants and dishonest merchants, good programs and bad ones, but it also depends on how YOU promote them. It isn't that difficult, but you get out of it what you put into it. Tossing up a site with a bunch of affiliate banners and nothing else (or some minimal, lame content) is a recipe for failure.