Hi possible,
There are many
possible answers.
Are you talking about posting one in your sig or in the body of a post? Most forums (like this one) don't allow affiliate links in posts at all and would have an even bigger problem with banners. Most if you can have images in sigs have restrictions.
Most people are banner blind or find them annoying so not sure why you'd want to use them. But if you want to find out how others are doing it on some forum you're on that allows them, just view source.
Do you know how to do that? If not we can tell you how.