A lot of that looks like fairly severe surface rust. How to stop rust is very simple in statement, remove it and cover the exposed bare metal with something (usually paint). When it's surface rust you can sand it, wire wheel it, sandblast it, etc. Then once it's all gone, paint. If it has gone from surface rust to rot, you will have to cut it out, replace metal, and paint.
You can slow rust by getting some rust inhibitor and spraying over the rust. But that will only slow it down and not stop it. For what you have I would remove it if possible, hit it with a wire wheel, and then paint it.