Two different girls are used as "doubles" for each character, so that Dove has someone to interact with when she is playing the other twin.
Sometimes, Dove is seen on screen as both characters at the same time, and this is done in post-production, where they have recorded her twice and merge both bits of footage together. Notice how there's always a little bit of space between Liv and Maddie when Dove is playing them both!
Here's the preview video:
link