The rules list exactly when the hazard lights must be on, and all three options in this question are on that list. After a crash and during an emergency stop where stopping is banned, they warn other drivers about a vehicle that is unexpectedly stopped. When towing, they are turned on in the towed vehicle: drivers behind must see that this vehicle is not moving under its own power and depends on the vehicle towing it