Here's the story behind House Lannister's origin in Game of Thrones. House Lannister was one of the richest and most powerful Great Houses that ever existed. The dynasty ruled the western region of Westeros for thousands of years, dating back to the Age of Heroes. House Lannister was involved in many of the violent confrontations between the royal families featured throughout Game of Thrones.
House Lannister became the royal house of the Seven Kingdoms after the death of King Robert and the fall of House Baratheon. Tywin Lannister served as the head of the family that notably included his children, Cersei, Jaime, Tyrion, and a handful of grandchildren. Following Robert's death, Joffrey, the supposed son of the King and Cersei, took the Iron Throne. The role then was forced on young Tommen following Joffrey's murder. Both children were, in fact, the product of Cersei and Jaime's incestuous relationship. When Tommen committed suicide, Cersei took the Iron Throne until the civil war throughout Westeros came to an end. Tyrion was the only Lannister left standing, so he became the head of the house when the series concluded.
The Lannisters were one of the oldest dynasties within the realm, having existed for around 6,000 years. House Lannister were descendants of the Andals, a race of men who first invaded the continent and carved the kingdom. Andals were known for their dominant physical traits which were displayed through the tall and handsome qualities of Lannisters. The founder of the Great House was Lann the Clever, a master trickster from the Age of Heroes who obtained Casterly Rock from its previous owners, House Casterly, with nothing but his wits (or so legend has it). Casterly Rock became the stronghold of House Lannister until they later resided in King's Landing. The house sigil featured a golden lion on a crimson background. Their official motto was "Hear Me Roar," although it was rarely used. The family tended to use "A Lannister always pays his debts."
Upon taking over the Westerlands, House Lannister became the Wardens of the West. They then went on to rule the area as Kings of the Rock before they swore their allegiance to House Targaryen. The last King of the Rock, Loren Lannister, ended up joining the force of 60,000 men against Aegon the Conqueror. House Lannister had no choice but to serve House Targaryen following the conquest. After Tytos Lannister lost hold on the family's power, his son, Tywin, put an end to their rebellious rivals to give the house an intimidating reputation. Tywin realigned their allegiances when he arranged the marriage between Cersei and Robert Baratheon in exchange for his support in the rebellion.
House Lannister played along under the reign of House Baratheon until they made their game-changing moves. King Robert was killed and Ned Stark was executed for treason which allowed House Lannister to pull the strings, wreaking havoc around Westeros. Their decisions would ripple through the realm as the War of the Five Kings broke out which became the main focus of Game of Thrones' eight tumultuous seasons.