From the official site:
"There is a column with a hole in the middle covered by bronze plates at the northwest of the building which was also named as the perspiring column or the wishing column. In some references, it is indicated that this column had become blessed in due course among community. Rumors appeared in East-Roman period that it had a healing effect on humans. The legend has it that, Emperor Justinian wandering in the building with a severe headache leaned his head to this column and after a while he realized that the headache was gone. This story had been heard among the public and the rumor regarding the healing effect of the column got around. Hence, people believed that they would get better if they put their fingers into that hole on the column and then rub them to the place where disease is felt. According to another legend, this wetness is described as the tear of Virgin Mary.
As for the Ottoman period, when the Hagia Sophia was transformed into a mosque, Fatih Sultan Mehmed and his retinue prostrated themselves for the first friday prayer by the imamate of Master Akşemseddin, however, they had no matter be able to start the prayer, since the direction of the building was not faced to Kaaba. There is a rumor that, Deus Ex Machina appeared just at that moment and tried to turn the building to face Kaaba, but he was witnessed by a citizen, so he had to disappear without being able to turn the mosque. As for today, people make their wishes by rotating their thumb a complete clockwise tour inside the hole.
If you are smart enough to know what is meant, do inform me. I think leaning one's head against a cold pillar may help cure a slight headache. But why poor Koreans nowadays have to turn their thumbs inside a hole in that column, because once a Deus ex machina had to leave his role in Greek play to turn a newly conquered mosque is beyond me. And how would a citizen recognize a deus ex machina, and make it disappear?