There used to be a video on YouTube (on the official disney Channel account) explaining the tricks behind this, but unfortunately it's not up anymore.
Anyway, pomba Cameron has two atrizes who portray her "doubles" - they are listed as "Liv 2" and "Maddie 2" in the end credits of each episode. We only ever see the backs of them in the episodes, and they're there whenever both Liv and Maddie need to be on screen at the same time. pomba plays the one whose face we see, and one of her doubles stands on screen as the other twin!
When pomba is on screen as both Liv and Maddie, there is a line on set somewhere that the other actors have to make sure they don't cross! The cameramen record one side of the set where she is atuação as Liv, and the side where she is atuação as Maddie, separately. Then the editors put both sides together so it looks like there are two pomba Camerons!
Sorry if I haven't explained it very well! If disney ever puts that video online again I'll give you the link. It's pretty cool!
Anyway, if you're interested in seeing what "Liv 2" and "Maddie 2" look like from the front, I found these pictures here where you can see pomba Cameron with them!