A contingent truth, or falsehood, concerns something that could have been otherwise. A proposition that expresses a contingent truth can be rationally denied without resulting in any self-contradiction. A contingent event is one that does not necessarily take place.
A necessary truth could not have been otherwise, and to deny a necessary truth involves a contradiction. A proposition is said to be necessary if it holds (is true) in all logically possible circumstances or conditions, and denying that proposition would result in a self-contradiction.
It is not clear that there are any necessary propositions and, if there are, they are restricted to analytic propositions or other propositions that are true by virtue of their logical form.
If there are necessary events, then natural rather than logical necessity is involved.
The concept of possible worlds is used semantically to explicate contingency versus necessity. Contingent propositions or sentences are supposed to have truth values that depend upon the how the world actually is, and they could have differed in different possible worlds. Necessary propositions are conceptualized as the special limiting case in which the value turns out to be true for every possible world. The logical status of abstract entities (contingent) is quite different to that of concrete entities. Recognition of this leads to more complex ideas of what possible worlds are, with consequences for what statements turn out to be necessary.
The concept of contingent versus necessary is employed in cosmological arguments, for example in St. Thomas Aquinas' Five Ways: Third Way: Contingent and Neccessary Objects:
Aquinas' Third Way defines two types of objects in the universe: contingent beings and necessary beings. A contingent being is an object that cannot exist without a necessary being causing its existence. Aquinas believed that the existence of contingent beings would ultimately neccesitate a being which must exist for all of the contingent beings to exist. This being, called a necessary being, is what we call God. The argument runs:
1) Contingent beings are caused.
2) Not every being can be contingent.
3) There must exist a being which is necessary to cause contingent beings.
4) This necessary being is God.
The distinction between necessary and contingent objects is fatal to Aquinas’ argument because he acknowledges that some objects simply exist without causation. The question then becomes which object/s is/are in actuality the necessary being/s.
Aquinas attributes the qualities of the Christian “God” to this necessary object. However, Aquinas has failed to make the case that the ultimate, necessary existence could not in fact be that which Aquinas is taking to be caused by “God”. In other words, Aquinas has invented an extra, regression step in order to conform to received religious belief. His argument is fatally circular .
Thomasian Five Ways