Seven seasons ago, the War of the Five Kings kicked off on Game of Thrones after Robert Baratheon and Eddard Stark's deaths, with Joffrey, Stannis and Renly Baratheon, Robb Stark, and Balon Greyjoy all vying for control of the Seven Kingdoms. Fast-forward several years and Game of Thrones has now turned into the War of Two Queens (and Jon Snow Fighting Wights).
The two women currently vying for control of Westeros are Cersei Lannister in King's Landing and Daenerys Targaryen in Dragonstone. Cersei's claim to the Iron Throne is pretty clear — she's the last person standing in the family of the most recent line of monarchs. But what is Dany's claim to the Seven Kingdoms?
To start with, she is the only surviving child of the last Targaryen ruler of Westeros, King Aerys II. Aerys wed Rhaella Targaryen (his sister), and they bore three children: Rhaegar, Viserys, and Daenerys. Before Dany's birth, Aerys's rule became increasingly erratic and dangerous, culminating in the murder of Rickard and Brandon Stark (Ned's father and grandfather). Their execution is in response to Rhaegar allegedly kidnapping Lyanna Stark against her will (which appears to be a false interpretation of what happened between Lyanna and Rhaegar) and Brandon and Rickard riding south to rescue her/demand justice for her.
Once Aerys executes Brandon and Rickard, the rebellion against the Targaryens is out in full force, with houses Arryn, Baratheon, Stark, and Tully rebelling against the throne, killing Rhaegar and his supporters — though the sacking of King's Landing and Aerys's death (along with the deaths of Rhaegar's wife, Elia, and their two children) lies solely at the feet of the Lannisters, who had previously stayed out of the rebellion, when they brutally invaded King's Landing and took control of the capital.
When all of this fighting broke out, Aerys sent his wife and young son, Viserys, to Dragonstone for safekeeping, which is where Rhaella gave birth to Daenerys (dying in childbirth in the process). With Aerys, Rhaegar, and Rhaella now dead, Viserys and Daenerys were smuggled out of Westeros by Targaryen loyalists, living in the Free Cities across the Narrow Sea until Dany just recently returns to Westeros to stake her royal claim.
One could argue that because Aerys was removed from the throne by a rebellion (and killed by his own Kingsguard), the Baratheons and Lannisters never had a rightful claim to the throne. As the last surviving Targaryen (that anyone knows about), Daenerys's claim to the Iron Throne is strong.
However, there is that messy detail about Jon Snow actually being the son of Dany's brother Rhaegar and Lyanna Stark, which gives him just as much of a claim on the throne as Daenerys.