Thanks for the question! Hercules is the Latin name for Herakles, a hero and demigod from Greek mythology. No reliable evidence suggests that Herakles ever lived. It is highly improbable that he is based on an ancient historical figure. Stories of Herakles are approximately three thousand years old and probably date to the early 1000s BCE, as Greek culture began to blossom.
As the son of the Greek thunder god Zeus, the character of Herakles was blessed with a variety of powers, most notably strength. In the stories of the Greek mythos, Herakles is famous for completing his twelve labors and interacting with a diverse pantheon of gods, goddesses, and mythical creatures.
Although Herakles did not exist, historians do know that he was a wildly popular (albeit fictional) religious figure across the Mediterranean. The fact that the demigod is commonly known by his Latin name of Hercules is evidence of this. The historian Thomas Martin states,
The only hero to whom cults were established internationally, all over the Greek world, was the strongman Herakles (Hercules). His superhuman feats in overcoming monsters and generally doing the impossible gave him an appeal as a protector in many city-states.
Just because Herakles didn’t exist doesn’t mean that he was not influential in the ancient world. In the same way that superheroes serve as symbols of bravery and goodness today, Herakles symbolized the triumph of humanity over the elements for the ancient world. The fact that his name is known across the globe today is a testament to just how important Herakles was, even if he was fictional! I hope this helps.