Choose a size of pipe. Most three-rail pipe fences use at least 4-inch pipe, for both posts and rails, but stouter posts may be needed in heavy use areas. Lighter 2-inch pipe may be used for rails in low-traffic areas. Smaller pipe may be cheaper but that saving may be offset by the need to get more of it to make the fence strong enough.
Pick a type of pipe, new or used. New pipe is more expensive, but some comes with a powder-coated finish which never needs painting. New pipe also is sure to be free of contamination. Used pipe is cheaper, but often comes from oilfield or industrial uses where it has been subjected to intense wear and exposure to salt, acid or other materials which may degrade it from the inside. Used pipe may be more likely to rust and deteriorate, though many oilfield pipe fences have been in use for fifty years or more.
Dig holes for the posts with a posthole digger. The hole should be at least a third the depth of the finished height. For instance, a 6-foot post would need a 2-foot hole to make a 4-foot fence. Secure posts with concrete, if possible, but use gravel, available rock or even existing dirt in remote locations. Tamp the material tightly around the post. Place posts 10 feet apart on average or the length of the pipe being used for rails.
Add rails by welding with a portable welding rig. Mark the rail locations on all posts first, typically one at or near the top of the posts, one about a foot above ground level and the third between these two. Tack weld rails first to hold them in place, then return to weld securely all around the rail pipe.