Playing a character in a scripted play or film or TV show is what actors routinely do. So when Stephen Colbert dons his TV character for his show, he is just acting. But the really tricky part is being in character while doing interviews because then much of it cannot be scripted in advance and you have to genuinely inhabit that character so that the exchanges seem genuine.
This requires considerable improvisational skills and is actually quite difficult. I used to wonder how Colbert prepares for his interviews and in this clip, he explains how he does them.