There are two ways you can do this:
The more common way to do it would be to give your affiliate a special url to use in their links, such as
mysite.com/referal.php?a=4912380312957893412, and then use google analytics to track visitors who have visited that url (with the
a=4912380312957893412 at the end). See this google analytics page on custom campaigns for instructions on how to do this in google analytics (they'll want you to use different url parameters, though).
The other way you could do this would be to count all visits from one domain as affiliate links. This isn't as accurate, for two reasons. This depends on users sending a referral header, and in some browsers this is disabled. Also, this would also count links from that site that your affiliate might not have anything to do with, e.g. someone posts a comment on that site with a link to your site.
You can then track your affiliate links in google analytics under traffic sources. I'm assuming that your using google analytics, because your question is tagged with that tag, but if you aren't, then let me know in the comments and I will edit this answer.