I don't think these are spoilers, but they explain why Jaime "Kingslayer" Lannister is still alive:Warning: Spoiler! (Click to show)
King Aerys Targaren was a madman who burned Ned's father and brother alive, in addition to many others. Then his son (Rhaegar) stole Lyanna Stark, who was betrothed to Robert. Rhaegar was Viserys and Dany's brother. These two things caused Ned, Rob, and Jon Arryn (the dead guy in the first episode) to rise in rebellion. Lannister claims to support the king, they are let inside the walls, then Twyin starts sacking the city on behalf of Robert. Jaime kills the old king, and thus, Robert's rebellion was successful. Because Twyin took Kings Landing, Robert marries Cersei Lannister, and obviously pardons Jaime
All of this is revealed in a Game of Thrones (the novel), but I don't think its a spoiler anyways.