Treasure is a favourite topic of many adventure stories. But there is no evidence that pirates actually buried treasure or made maps showing where it was. It is all fiction and based on Robert Louis Stevenson's adventure book 'Treasure Island'.
But that aside, there is treasure out in the oceans as well as under the soil. Over the centuries, many Spanish treasure ships making their way from the Spanish Main to Spain were lost in storms. As a result, the gold and silver they were carrying sank to the bottom of the sea in international waters.
Hundreds of years before that, the merchants travelling by ship around the coasts of the Mediterranean in small boats were often overwhelmed by storms and sank while full of goods such as jars (amphorae) full of oils. The oils have long vanished, but the jars remain along with other goods. To an archaeologist, that is treasure.
On land, some rich people in past centuries buried their wealth for fear of it being taken by raiders. Then, for some unknown reason, they never returned to collect it. When these collections of coins are found they are called treasure trove.
In ancient times, many regions required that wealthy and important people be buried along with goods that would be needed in the afterlife. These grave goods were often of gold and silver, and so are treasure to archaeologists. The ship burial at Sutton Hoo, England, is probably one of the most important from Europe. Of course, the Ancient Egyptians did the same, burying immense wealth with their pharaohs, and tombs such as that of Tutankhamun have uncovered the most amazing pieces of art. But, of course, a grave is easy to identify, and over the centuries grave robbers have seen these grave goods as treasure, and robbed most of them out.
So yes, there is treasure about, often in the form of gold and silver. But most of it is of immense value not for the gold or silver, but as objects that tell us about what life was like for our ancestors.