One way to do this is to have the character play against a certain Trope. See this clip from Firefly for a great example of this. The hero acts in a very different way than most heroes and it both reveals characters and entertains...
https://www.youtube.com/watch?v=NPRlHwwVIug
Another way to do this is to make a character act against some controlling belief they have in themselves. Like they think they're evil and they have done lots of evil things because of this. But some shift in the plot causes them to see the event or time that makes them believe themselves evil in a different light. This causes them to do something that is surprising and different and that also makes their character grow. Anytime a character's actions can advance both character and plot, that's a good thing.
Another way to make a character different (and so surprising) is just to put a character in a situation that would usually be taken by a different kind of character. Make a Buffy a vampire slayer instead of the heroic warrior or make a detective have some personality trait that seems like it would make it hard for them to do the job but, in fact, also helps them to do it. For example, MONK. Not your usual tough-guy detective and interesting because of that.
In screenwriting there is this idea that audiences love the familiar and strange in plot. They want to recognize the type of story they're being told but they want to have twists to it that make them feel they're watching something that is also completely new. I think this is something to shoot for with characters. And one aspect of that is creating surprises.