A user needs to provide x corresponding to hash(x) in order to spend an output.
Under the protocol, one of the participants is required to provide the secret number in order to spend an output. Once they do that, the other participant can use the secret number to spend an output on the other chain. This provides a mechanism to link the 2 chains together (in addition to lock times). Once the first output is spent, that commits the transfer.
This is half of the scripting operations required to implement the protocol.