In the books

In the A Song of Ice and Firenovels, Joanna was a first cousin of Tywin, the daughter of one of his father Tytos' brothers. Thus her full name was already "Joanna Lannister" before she married Tywin. She was the sister of Ser Stafford Lannister.

Though Tywin was always a stern and ruthless man, Joanna was said to bring out what little warmth he had, and he was even known to smile in her presence. Tywin and Joanna were very deeply in love, and thus Tywin took her death very hard. He became even more stern and was never known to smile again. Her death also fueled his unreasoning hatred for his younger son Tyrion, whom he blamed for killing her, combined with the shame he brought on their House for being born a dwarf.

According to the books, Cersei and Jaime were eight or nine years old when their mother died, while in the TV series Cersei said she was four years old.