The youngest son of Tywin and Joanna, Tyrion Lannister is viewed with disgust by most of his family, both for being a dwarf and for the fact that Joanna died giving birth to him. Only his brother, Jaime, treats him with something resembling familial affection, while his father, sister, and nephew Joffrey openly hate him. Tyrion has a reputation for drinking, sleeping with sex workers, and answering everything with sarcasm, but he's much savvier than those around him believe.
During the war after Robert's death, Tyrion is shuffled around quite a bit. First, he's a captive of House Stark, which blames him for Bran's injury, then he's returned to King's Landing. He is injured but not killed in the Battle of Blackwater, where he masterminds the victory. As part of one scheme, he's forced to marry Sansa Stark, although he assures her he will not force her into bed and even tries to shield her from some of Joffrey's cruelty. He is later blamed for Joffrey's murder, actually does kill Tywin, and escapes thanks to Jaime's help.
Tyrion meets with Daenerys Targaryen and, in time, agrees to join her side and becomes Hand of the Queen. His diplomacy helps to gain Daenerys more allies and resources, and he's with her delegation when Jon Snow comes to ask for help. Tyrion manages to survive the bloody end of the war, and it is he who suggests the idea of electing kings, starting with Bran Stark.