Let us all heed the wisdom of Wikipedia:
'Frack or 'frak' is a bowdlerised version of fuck first used in the original Battlestar Galactica series. In the "re-imagined" version it appears with greater frequency and with the revised spelling "frak", as the producers wanted to make it a four-letter word. In that framework it seems to function as a substitute for "fuck" in several different forms, as an interjection ("Frak!"), inquisitive idiom ("What the frak?"), verb ("You're not still frakking Dualla are you?"), adjective ("Get your motherfrakking hands off me!"), a noun ("You miserable frak") or in words ("What a clusterfrak.").'
I'm personally very partial to the derivate word "clusterfrak". It can give a potentially disastrous situation a small dose of humor