The noun rack applies to various types of framework; the verb rack means to arrange on a rack, to torture, trouble or torment: He was placed on the rack. She racked her brain.
The noun wrack means ruin or destruction, and generally is confined to the phrase wrack and ruin and wracked with doubt (or pain). Also, nerve-wracking.
The verb wrack has substantially the same meaning as the verb rack, the latter being preferred.
The rules in prefixes apply, but in general, no hyphen.
The preferred spelling when used to say a person is wracked with doubt or wracked with pain. Also, nerve-wracking.