How do different implementations of the Bitcoin Cash client know which type of coin they're processing?
They don't.

They have different, but sometimes common, consensus rules. There are two competing fork blocks with different transaction ordering rules and some transactions with either OP_MUL or OP_DATASIGVERIFY. One of the blocks are valid for that client, followed by many valid blocks. Sometimes, they process transactions of both network, as the replay protection is optional. They simply process if something is valid, or not if it's not.