This is all about the subjunctive mood. Here's another example: If I were rich, I'd buy a Rolls Royce.