It is literal, in the OT they used to put on sackcloth and heap ashes on their heads. There are many examples in the bible. For example, the entire population of the city of Nineveh did this to repent and avert God’s destruction of their city.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.