Tens of thousands of rail workers are walking out in a dispute over pay, jobs and terms.