The common uses of the subjunctive mood are for "Contrary to Fact" statements. The "If there were..." statements mentioned in other writeups are Present Contrary to Fact. They represent a conditional statement which is not true. Another good example of this is, "If I were you..."
Future Contrary to Fact also uses the subjunctive. These imply something that is not going to happen in the future. e.g. "If I were going to go, I would..."
Past Contrary to Fact does not use the subjunctive. Rather, it is expressed using the Past Perfect Indicative. e.g. "If I had gone..."
Optative statements, those of wishing, do in fact use the subjunctive, though many people do not use it correctly. They are an extention of CtF. As in: "I wish I were rich. I could buy my way to Pedant level." The (false) condition is implied through the wish.