Mechanical removal of scale (wire brush, needle scaler, etc.) then Ospho (phosphoric acid) for chemical stabilization to allow for painting.
https://www.acehardware.com/departments/home-and-decor/cleaning-and-disinfectants/rust-removers/13868
That’s a general answer to a general question...