Although this article shows S-scale cars, the same concept can be used for hoppers in other scales as well. One of my PRR hoppers needed a coal load (actually it is a G-series car, so it is considered a gondola in PRR-speak). I wanted the load to be removable. The book "Detailing Freight Cars" by Jeff Wilson shows a simple technique for using foam. I had a sheet of foamboard available, so I cut out a piece to just barely fit within the car.
For the actual coal, I found a bag of "Decorative Sand" ("Black Coarse Sand", item #73054, made by Panacea Products Corp, Columbus, OH) at the craft store Michael's. It contains sand kernels that are about two scale inches in size, which is perfect for the finer run from coal mines. The material glitters a bit, which adds to the effect, I think. It is actual sand so it does have some weight to it. This might be good for cars that are a bit light. However, ultimately any material that looks like coal (or even coal itself) can be used.
Using a knife with no.11 blade in it, I carved the top of the foamboard piece to be shaped like the final shape of the load that I wanted. I then painted the top and sides of the piece with a black acrylic paint. While the paint was still wet, I poured some of the "coal" sand over the top. I let this dry overnight, just to be sure. The next morning, I flipped to load over to allow the loose pieces to fall off. I couldn't quite get the camera to take the shot without using the flash, so the coal looks too gray in the photo. I did the work on a piece of glass, so that I could recover all the pieces of sand to be reused.
One thing I discovered (having never painted foamboard before), was that the piece had warped. I had only painted the top and sides of the piece. I then painted the bottom, but it didn't help. I thought about it for a while, but realized that I could manipulate the placement of the materials on top to make the load appear to be flat. The foamboard piece will rest on the crossbearers of the gondola. The curvature of the piece wouldn't be visible at the top of the car.
I then started pouring several thin layers of the sand on top of the load, immediately followed by drops of rubbing alcohol and drops of matte medium (mixed 50/50 with water). I let each layer dry for about an hour before applying the next one. I kept going until I had the shape that I wanted. The load is quite heavy now. Here's the load dropped into the car for which it was intended. By holding the car upside down I can remove the load carefully with the point of a knife. I have seen people using a tool with a magnet at one end to be able to lift the load out if a matching magnet is glued to the underside of the load. I might do that down the road. Note how you can no longer tell that the load is warped!
I built another coal load for an H21a in a similar manner. In this photo the load sits too high. Later on I removed some of the foam underneath so that the load sits lower on the car's crossbearers.