Man taken to hospital after being hit by train