Was this a ban in a channel, or for the entire network?
If it's just the channel, then you could try doing /who <channel> repalcing <channel> with the name of the channel, then look at the information that is returned and send a /msg to a name in that list that has an @ character beside the name.

If it's for the network, you're going to have to try to contact them using their website.

In either case, you will have to ask for the ban to be removed, so that you can reconnect/rejoin and chat.
Please note that some bans are place on an IP Address using a wildcard, so there will be many addresses banned by the one ban, even if there was only one person responsible for the ban being issued.