Civil contempt of court is used to coerce a party to perform an action. When discussing civil contempt, commentators often use the phrase "the contemnor has the key to the cell in his own pocket". What this means is that the contemnor will be punished for only so long as they refuse to perform the action required of them by the court. Once the contemnor performs that action, they will be immediately released from whatever sanction the court has imposed.
Civil direct contempt of court is used to maintain order during court proceedings, whereas civil indirect contempt is used to motivate compliance with a court order.