Jokanaan is a dude shrouded in mystery and surrounded by controversy. Some say he's a prophet. Some say he's not only a prophet; he's the reincarnation of Elias. The whole Elias thing is important because it is written in the Book of Malachi, from the Old Testament, that the return of Elias will herald the coming of the Messiah. It's a big deal.
Now, the truth—or lack thereof—of these claims isn't all that important as far as the play is concerned. What really matters is Jokanaan's commitment to his beliefs. Early on, the first soldier tells the Cappadocian that Jokanaan came "[f]rom the desert where he fed on locusts and wild honey […and] was clothed in camel's hair" (44). He spent his time there prophesying, and attracted many followers.
So why should we care about what he ate and what he wore? Here's the short answer: you should care because they're signs of his total commitment to his God. He lived in the desert and ate bugs rather than be distracted by the cares of the world. He simply wants to preach and prophesy.
This same commitment is what gets him locked up in the first place. Although it's never mentioned specifically, it's Jokanaan's criticism of Herodias' incestuous marriage that gets him locked up in the cistern—but even that punishment can't stop him from spreading the word. He continues to cry out, which gets on the nerves of Herod and Herodias; and he refuses to budge when Salomé attempts to seduce him.
So what motivates his super-intense fervor? Well, this passion seems to spring from his belief in the really sinful nature of man; and his special hatred for Herodias and total rejection Salomé come from his understanding of Original Sin. As he tells Salomé:
"By woman came evil into the world. Speak not to me." (146)
Whoa. That's kind of misogynist, dude.
Okay—even though he spends most of the play cursing Salomé and her mother, he isn't simply a woman-hater. Indeed, the central theme of his prophecy, that a Messiah is coming, implies that Man with a capital M (so not just woman) needs saving. He's convinced of Man's morally filthy nature and he tries his best not to become too involved in the pretty much any humanity…hence the whole hanging-out-in-the-desert thing.
For Jokanaan, through his total embrace of God and rejection of the physical, makes him a foil to Salomé. The two figures occupy opposite ends of the same spectrum: Salomé can't help but be obsessed with Jokanaan's body and Jokanaan can't even entertain the possibility of looking at hers. She can't take her eyes off him, and he can't help but cover his own.
The two are extreme figures, one devoted to physical beauty, the other devoted to chastity and metaphysical perfection.