Let's try to put this simply. Affiliate marketing is when a company sells its services/products through a network of affiliates - who make a commission from sales or leads provided. It has become a powerful internet tool in recent years, and one of the dominant modes of advertising online.
How does it work for your website though? Well, it can work in two different ways - depending upon your needs.
If you're selling a service or product through your website, you could consider setting up an affiliate network to which other websites can sign up. They would then put links and information pointing back to your website. Each link would contain a unique tracking id, letting you know where visitors come from, and enabling you to pay a commission to affiliates that send paying customers your way. One of the big adantages, for advertisers, is that in this sytem they don't necessarily pay per ad display, but rather per item sold (though you can of course enter into an agreement to pay affiliate sites for each visitor they send you, regardless of whether that visitor buys anything).
You can set up your own affiliate network program at a design level, though many businesses simply use broker companies - like TradeDoubler who will handle affiliate sign-up, tracking, commission calculation etc.
Depending upon the type of website you run, though, you may be more interested in joining an affiliate network as a publisher - that's to say as a website owner who's willing to display affiliate advertising/links etc.
Various different industries offer online affiliate programs - from web hosting companies, through to hotels, supermarket chains, and even banks. For some affiliate programs you'll have to prove a certain amount of internet traffic (i.e how many people visit your site per month), while others are open to anyone wishing to participate, provided that your website adheres to a set of guidelines decided by the network. For example, most affiliate programs are not open to websites that contain adult, offensive, or illegal material.
Just as those wishing to set up an affiliate network sometimes find it easier to go through a middle man, so it is for publishers seeking affiliate network advertising. You can sign up with various different companies (again, we recommend TradeDoubler *), who will match you up with affiliates and serve up ads to your site.
The best policy for affiliate marketing and advertising is to ensure a good match - for example, if your website is devoted to the novels of Leo Tolstoy, you'd be recommended to join an affiliate program with a bookseller - like Amazon.
Google adsense is similar to an affiliate program (though you don't actually sign up as anybody's affiliate technically). With Google adsense, you can either choose to advertise through Google's huge network, or to become part of that network and publish ads on your site.
Google's tremendous advantage is that it's simple and quick. As long as your material follows their publisher and advertiser guidelines, you can get set up almost straight away. Also, for publishers, once you have a google adsense account you can place ads on any of your sites that follow the publishing guidelines.
Another advantage is that google's ads are contextually placed on your site - which means that, using various behind the scenes formulae, google works out what the page where you wish the adverts to appear is about, and chooses the most appropriate ads for it. This, generally works well, meaning you (as a publisher) get ads that are likely to be of interest to your readership. It is, though machine driven, and thus has anomalies - for example, one of our clients deployed google adsense on a page critical of the Iraq war, and yet all the ads displayed were for 'support our troops' badges! This is obviously a down side for both publisher and advertiser, as the match is completely wrong. Still, for the most part it works well.
(*Why do we recommend Tradedoubler? Well, first of all because we use it and are impressed. Second of all, because it has an impressive list of advertisers (including i-tunes, Dell, Apple, and Harrods, amongst others), and a simple to use interface)