Blackfyre is a Valyrian steel sword that originally belonged to Aegon I Targaryen, which he carried during the Targaryen Conquest of the Seven Kingdoms. Afterwards it became the treasured ancestral blade of House Targaryen, carried by kings and princes.
A little over a hundred years before the War of the Five Kings, King Aegon IV the Unworthy gave Blackfyre to his bastard son Daemon, a great warrior, instead of his lawful son Daeron II Targaryen. Many thought that this was a sign that his father favored him to rule. Afterwards, he founded his own cadet branch of House Targaryen, House Blackfyre - taking its name from the sword - and himself became known as Daemon Blackfyre.
On his deathbed, Aegon IV foolishly legitimized all of his bastard children, among them Daemon Blackfyre. His lawful son succeeded him as King Daeron II Targaryen, but eventually, Daemon Blackfyre rose up in a civil war to try to replace him on the throne, known as the Blackfyre Rebellion. The sword was lost at the end of the war.
In the books
After Aegon I died, his son Aenys Targaryen succeeded him as king, a weakling, while his younger son Maegor Targaryen was the greatest warrior of his generation. When Aegon I died he was cremated along with the sword, as per Valyrian custom, and Blackfyre was recovered from the ashes - no normal fire can harm Valyrian steel. Soon after Aenys succeeded he voluntarily gifted Blackfyre to Maegor, saying that he was always the better warrior and it would be of little use to himself. Aenys meant this as a magnanimous gesture, but many saw it as a sign of weakness to simply give his brother such a vital symbol of royal power. After Aenys died during the Faith Militant uprising Maegor usurped the throne ahead of Aenys's own children. The only one to protest was the current Grand Maester, but Maegor promptly beheaded him with a single swing of Blackfyre, and there was no further complaint.
Nearly seventy years after that the sword passed to Daemon Blackfyre. Already the greatest fighter of his generation, when he wielded Blackfyre in battle he was said to resemble the Warrior himself (the warrior-aspect of the Seven). When Daemon died at the Battle of Redgrass Field his followers managed to recover the blade, and his half-brother Aegor "Bittersteel" Rivers led their surviving forces to flee east to the Free Cities, taking Blackfyre with them. Later Bittersteel formed the sellsword army known as the Golden Company, in order to at least maintain some semblance of a standing military force as Daemon's supporters plotted to return to Westeros and put his sons on the throne.
Fifteen years after the war's end Daemon's thirdborn son, Daemon II returned to Westeros in an attempt to rally his father's former bannermen, and instigate a second rebellion. Nowhere near the warrior that his father was, however, Daemon II fails to inspire the lords of Westeros into following him; partly because he did not have Blackfyre in his possession, as Bittersteel had refused to give it to him. The sword itself presumably remained with Bittersteel in Tyrosh. What happened it after his death, however, is unknown.