If this is a channel ban, then you have to contact an op in the channel and enquire if the ban is temporary or not.
If the ban is temporary, ask how long the ban is for, then try joining the channel again after the ban expires.
If the ban is permanent, ask for the ban to be removed.
In both cases, make sure you tell the op that you are being affected by a wildcarded ban set on a spambot.
Also make sure that you are polite.

If this is a network ban, then you'll have to contact the network IRCops or Administration, probably through their website.

A copy of the exact message that you receive would be helpful in determining just what kind of ban it is, and, possibly, what, if any steps that you are required to take.