Section 1698 answers the question that follows every "but we agreed something different later". Subdivision (a) states the easy case: a contract in writing may be modified by a contract in writing. Subdivision (b) adds the important one: a written contract may be modified by an oral agreement to the extent that the oral agreement is executed by the parties. "Executed" means carried out — the modification is effective as far as it has actually been performed, which is why a change both sides have already acted on stands up and a change only talked about does not.
Subdivision (c) supplies the third route. Unless the contract expressly provides otherwise, a written contract may be modified by an oral agreement supported by new consideration; and if the contract as modified falls within the statute of frauds in § 1624, that statute must be satisfied. Two conditions sit in that sentence. New consideration is required — something given for the change, not merely agreement to it. And a clause requiring modifications to be in writing does have effect on this route, since subdivision (c) applies only where the contract does not expressly provide otherwise.
Subdivision (d) then keeps the door open for the doctrines that operate around all of this: nothing in the section precludes, in an appropriate case, estoppel, oral novation and substitution of a new agreement, rescission of a written contract by an oral agreement, waiver of a provision, or oral independent collateral contracts. So a party who has relied on an assurance is not necessarily defeated by the absence of writing or consideration. Which route a particular change ran down, and what was executed, are factual questions worth taking to a lawyer.