Rails or rail systems are a universal mounting system for accessories such as flashlights, lasers, optics, and so on. The common rail tyle seen is the Picatinny rail also known as MIL-STD-1913. Without a rail system, if you needed to mount an optic to a rifle for example the rifle would have to be drilled and tapped for scope rings which was a labor intensive and cost prohibitive job in many cases if you are trying to mass produce rifles. What's worse would be that the modifications made would only work for certain specific optics. The beauty of the rail system is it is a universal mounting point and it could allow you to change to nearly infinite combinations of options without changing the rifle itself.