Pipe comes in many shapes and sizes and can be found almost anywhere. For dioramas and model railroads, it is an easy scenic detail to make for yourself. Pipes make excelent scenic details for trackside, mills, scrapyards, construction scenes or of course as open loads for freight cars. The techniques and materials shown here will work for most scales - only the relative diameter of the pipe will change.
You can find parts to make pipe at your local hobby shop. Most shops will have a good supply of plastic tubing along with other structrual shapes. This plastic is relatively cheap and comes in a good assortment of sizes and lengths. One drawback however is the thickness of the material. Thicker styrene tubing works well for simulating concrete pipe, but is a little overscale for steel. You can carefully reduce the profile of the pipe at the ends with a sanding attachment in a rotary tool.
Brass tubing is also commonly available. This has a much thinner profile and like the plastic can be painted in any color to represent the pipe of your choice. A drawback however is the price. The cost of the tubing can really add up. Also, if you are using the tubing to make a load for a freight car, the weight of multiple brass tubes can be more than you'd desire.
Making Your Own
Fortunately for modelers, some of the most realistic material for piping is also the cheapest. You won't find it at your hobby shop or hardware store, you'll have to check the supermarket.