In the beginning of the first Hobbit movie it is said that Smaug attacked the kingdom of Erebor, but during the movie they frequently reference going into Moria which they call the home of the Dwarves, and rid it of Smaug. What is the difference between them? Is Moria inside Erebor? Is Moria just the mountain where the Dwarves lived? They had their own king, so if Moria was the kingdom of the dwarves, why do they still say Kingdom of Erebor?
I have not seen the second or third Hobbit movies, but if they claimed that Smaug was "in" Moria and needed to be evicted, that would appear to be a mistake. Erebor and Moria are two completely different places. However, I suspect your confusion stems from the fact that the dwarves were evicted from both places, and want to retake both places, just for different reasons.
The short answer is: the dwarven Kingdom Under The Mountain was originally ruled from Moria, which the dwarves called Khazad-dûm. At some point, the dwarves accidentally released a monster into Khazad-dûm, and were forced to flee. Many of them settled in the mountain called Erebor, the Lonely Mountain, and reformed their kingdom there. Later, when the dragon Smaug came and took over Erebor, and drove the dwarves out again, some of them tried to move back into Moria and reclaim it -- not from Smaug, but from the orcs that had taken up residence there.
The longer answer:
Moria is a vast complex of caves, mines, and tunnels under the Misty Mountains. It's more properly called Khazad-dûm, and was the ancient home of the clan of dwarves that were descended from Durin. Tolkien claimed there were 7 clans, though I believe only 3 are ever named. All of the dwarves we ever see in the movies are members of Durin's clan, which was originally ruled by the King under the Mountain, from within Khazad-dûm.
About 1000 years before the events of The Hobbit, the dwarf miners in Khazad-dûm released a dangerous creature -- the Balrog seen the Fellowship of the Ring -- and the dwarves were all forced to flee. They eventually made their way to the Lonely Mountain, Erebor, and set up a new kingdom "in exile" there. This is about where things stood as of the beginning scenes of The Hobbit: An Unexpected Journey, which shows Smaug attacking Erebor and driving the dwarves out of there as well.
At this point, the movies deviate a bit from the original novels. From the appendices for The Lord of the Rings, plus one passing comment from Gandalf in The Hobbit, we learn that Thror (the grandfather of Thorin, the dwarven King through most of The Hobbit movie trilogy) tried to get into Moria alone, and was caught and beheaded by Azog, starting a huge war between the Orcs and Dwarves. In The Hobbit: An Unexpected Journey, it's Thror who actually leads his army during that war, attmepting to retake Moria from the orcs. He is still killed by Azog but much later, and in battle, near the end of the war.
Even though the dwarves eventually win that war, they don't end up moving back into Moria for a long time. They do manage to drive Smaug out of Erebor, and move back in there instead. It's not until Gandalf comes along, almost a century later, and kills the Balrog that Moria becomes habitable.