The Pyrenees, according to Greek mythology at least, take their name from Pyrene, daughter of King Bebrycius who was raped by Hercules, after which she gave birth to a serpent. Terrified by how her father would react, Pyrene fled to these hills, where she was torn apart by wild animals. Hercules later came upon her lacerated remains, and overcome with grief, commanded the surrounding mountains help create a tomb for her by piling up rocks. Thus, the Pyrenees were created.
A more likely explanation is that the Iberian microcontinent began to crash into Europe some 55 million years ago causing a massive uplift and slowly and powerfully forming the range.