Deterrence is a set of actions or positions that persuade an opponent not to take some action. While its most common usage is in military and political strategy, its roots are in game theory. The opposite, and less commonly discussed approach is compellence, a set of actions that forces an adversary to take some action.
Restraining orders are deterrence mechanisms implemented through courts.
Mutual assured destruction
Perhaps the most famous, or infamous, deterrence strategy apparently succeeded in preventing nuclear warfare between the Soviet Union and the United States. Mutual assured destruction, with the rather appropriate acronym MAD, required each side to have a sufficiently invulnerable set of nuclear weapons, such that any conceivable attack by one side would leave the other with enough weapons to do unacceptable damage to the original attacker.
Attrition is a variant on deterrence, in that it does not attempt to prevent the adversary from starting an action, but rather make it so costly to continue the action that the opponent will abandon it.