Job opens with a prose narrative unlike anything else that follows it: a heavenly wager in which "the satan," better understood here as an adversarial prosecutor among the divine court than a later personal devil, proposes that Job's piety is merely a product of his prosperity, and God permits Job stripped of wealth, children and health to test the claim. The bulk of the book that follows is poetry, a lengthy formal debate between Job and three friends, Eliphaz, Bildad and Zophar, who each insist across repeated speeches that Job's suffering must be deserved punishment for hidden sin, a position the book's prose frame has already told the reader is false.
Job refuses to accept his friends' explanation, maintaining his innocence and increasingly demanding that God himself answer for the apparent injustice, until God finally speaks from a whirlwind, not to explain Job's suffering at all but to overwhelm him with the vastness and strangeness of creation, wild animals no human tames, cosmic foundations no human laid. The book closes back in prose, God rebuking Job's friends for their false comfort while restoring Job's fortune twofold, an ending some readers find a genuine resolution and others find strangely mismatched to the poetry's unresolved theological demands.