Liv and Maddie are actually one girl with a serious Split Personality issue.We're watching the show from Liv or Maddie's perspective, depending on which girl is real. Either way, she believes her alternate personality is a real person. The other people on the show just play along and pretend Liv/Maddie has a twin sister.
Liv is short for Olivia
Miley Stewart once made herself acquainted to Maddie and thought Liv was an alter ego created by Maddie for similar reasons Miley created HannahNot likely. In Real Life Hannah Montana ended two years before Liv and Maddie started, meanwhile In-Universe Liv left home for four years to film the Show Within a Show Sing it Loud!. This means that when Liv went to Hollywood Miley had already there living a double life for four years.