You'd basically just be doing matting tricks (think green screen), but in a different way. The animated character needs to be rendered in one video on a background with a flat color that's uncommon (again, green screen) and then you "matte" it in to your live action scene using a tool like Final Cut, After Effects, or whatever.

The technical challenge is in framing both shots to line up. For example, if you're shooting your live action footage down a long hallway, you need to have your character animated as if they were standing in the hallway. Or if you're doing a shot down a staircase, animate them as though you're looking at them down the staircase. They need to line up if you're going for a true effect like Who Framed Roger Rabbit? You also need to consider how you light your animated character to make it all line up. It's all fairly technical.