When you sign up for an affiliate they will give you the affiliate code (provided they accept you).
If an affiliate choses not to accept you, don't take it personally. Adsense is typically the easiest to get approval for, followed by Amazon and Ebay (with Ebay being the toughest - read their affiliate info and you'll know why).
When you sign up and receive the code enter it on your affiliates page and then you're all good to do. :)