Say the user wishes to perform a dangerous but necessary task, from which there is no recovery or going back (for example, erasing a hard drive, or permanently deleting an online account after confirming they don't want to simply disable it - these are just examples, it could be something done more frequently).
There is of course always the issue that the user has not entirely understood the implications of the actions they are about to take (or even understand the action itself) - so of course it is necessary to prompt the user to confirm their choice of actions.
Bearing in mind the seriousness of the task they might be about to do, how can you get a user to confirm their choice of action and acknowledge that they understand the consequences in such a way that:
A) They aren't inclined to ignore warnings or messages explaining what's about to happen and just jump straight to whatever button/tickbox will move to the next step.
B) The user experience isn't degraded by excessive prompts, warnings and hurdles that may bore the user and increase the problem outlined in A.
C) Allows you (the service provider/developer) to have some indication that they really did see any warnings you gave them so they can't turn around afterwards saying they didn't see a warning when they actually just ignored it.
C would seem the tricky one. My first inclination would be to require the user to answer a question about the task.
So in the case of erasing the drive, you might ask them "What will happen to any personal documents stored on the computer? A) Nothing, B) Permanently destroyed, C) Automatically backed-up" - and if the user answers anything other than B, don't allow them to continue. While this may work in that particular context, I can't think quite how you'd adapt this to other situations, and it does seem to beckon point B again where you're interrupting the user.