I assume you are referring to the spacing provided between successive railway sections. This gap is scientifically known as an expansion joint. It is so called because it provides for the expansion of railway sections due to heat.
When metals are heated, they expand. This expansion is a property of the material and some materials may expand more than others (for the same change in temperature). At high temperatures, railway sections expand and this expansion needs to be incorporated into the design of railway lines. To allow for safe expansion of railway sections (without causing any danger to the train movement), a small gap is provided between successive sections. This gap is one of the reasons train motion is not generally smooth and also generates constant noise.
Hope this helps.