A ban can last from a few minutes to a few months, all depending on why somebody got banned, how often the banlist of the channel is cleared or whether somebody remembers to remove the ban or not.
You can try messaging the op who kicked you if the kick message was not a sufficient explanation as to why you were banned. If you have not been in the channel too long, then scroll up in your Status window and you should still have a list of all the people who were in the channel when you first joined. You can try message'ing one of the other ops of the channel if they are still online.
If this doesn't work out, then your best bet is to go do something else for a while. After all, there are tons of channels on IRC and you can be sure to find a more friendly one.
If you still want to return to the channel that you were banned from, just keep trying to rejoin every once in a while.