These are the stairs, or the 'della scala' that leads down to the church at the base of the valley. The legend is that it's not possible to count how many steps this stair case has. No mater how careful you are, if you count steps walking down, you will always get a different number when you try to verify your count by going up the staircase.
Massafra is not a place you would normall visit but if you have time it's worth the effort. To tour the caves, I think you need to contact the mayor or information desk to schedule it.