'Were' is used in the subjunctive mood to express hypothetical situations, wishes, or conditions that are contrary to fact. This usage is essential for constructing sentences that reflect non-real or imagined scenarios, connecting closely to the nuances of mood in English grammar.