On the Day when their faces will be turned over in the Fire, they will say: "Oh, would that we had obeyed Allah and obeyed the Messenger."
means, they will be dragged into the Fire on their faces and their faces will be contorted in Hell, and in that state they will wish that they had been among those who had obeyed Allah and His Messenger in this world. Allah describes how they will be in the Hereafter:
وَيَوْمَ يَعَضُّ الظَّـلِمُ عَلَى يَدَيْهِ يَقُولُ يلَيْتَنِى اتَّخَذْتُ مَعَ الرَّسُولِ سَبِيلً
يوَيْلَتَا لَيْتَنِى لَمْ أَتَّخِذْ فُلَناً خَلِيلً
لَّقَدْ أَضَلَّنِى عَنِ الذِّكْرِ بَعْدَ إِذْ جَأءَنِى وَكَانَ الشَّيْطَـنُ لِلِنْسَـنِ خَذُولاً
And the Day when the wrongdoer will bite at his hands, he will say: "Oh! Would that I had taken a path with the Messenger.
Ah! Woe to me! Would that I had never taken so-and-so as an intimate friend! He indeed led me astray from the Reminder after it had come to me. And Shaytan is to man ever a deserter in the hour of need." (25:27-29)
رُّبَمَا يَوَدُّ الَّذِينَ كَفَرُواْ لَوْ كَانُواْ مُسْلِمِينَ
How much would those who disbelieved wish that they had been Muslims. (15:2)
And here too, Allah tells us that when they are in this state, they will wish that they had obeyed Allah and His Messenger in this world:
وَقَالُوا رَبَّنَا إِنَّا أَطَعْنَا سَادَتَنَا وَكُبَرَاءنَا فَأَضَلُّونَا السَّبِيلَ