Trains are cancelled and railway lines closed on what is set to be the UK’s hottest day on record.