The parol evidence rule keeps prior or contemporaneous agreements from contradicting a written contract the parties intended as their final expression. It is a rule of substantive contract law, not of evidence, despite the name.
Integration is the threshold question. A contract that is completely integrated — the whole deal, finally expressed — admits no evidence of prior terms at all. A partially integrated one admits consistent additional terms but still bars contradiction. An integration clause is strong evidence of complete integration and is why those clauses appear at the end of nearly every commercial agreement.
What the rule does not bar. Evidence offered to show fraud in the inducement, duress, mistake, illegality, or lack of consideration. Evidence of a condition precedent to the contract taking effect at all. Evidence of a subsequent modification, which by definition is not prior. And evidence offered to explain an ambiguous term rather than to contradict a clear one.
The fraud exception is where the fighting is. Jurisdictions differ on whether an integration clause, or a specific disclaimer of reliance on representations outside the document, defeats a fraudulent-inducement claim. Some enforce a specific non-reliance clause and some do not.
The drafting lesson. If a promise matters, it belongs in the document. A party who signs an agreement stating that no other promises were made will find that statement quoted back.