Railbanking happens.
Starting in the sixties, when many railroads began to merge and consolidate their operations, quite a few lines were abandoned because they were redundant and uneconomical to operate.
Typically the contract between a railroad and local land owners states that if the right-of-way ceases to be used for transportation purposes, then the railroad's land reverts to the original owner.
Luckily, to prevent the destruction of potentially valuable right-of-way, we have the process of railbanking. In this process, the railroad's right-of-way is purchased by the local government, complete with tracks, bridges, tunnels, etc. This is under the agreement that if the railroad needs the land again, they can buy it back and reopen it.
During the interim period, the right-of-way is usually fixed up for recreational use. Tracks are removed, the right-of-way paved, and a multi-use trail is built where the tracks once were.
For example, the Washington and Old Dominion Railroad was an interurban line, abandoned in 1968. The right-of-way was acquired by the Northern Virginia Regional Parks Authority in the seventies, and the whole railroad was reopened as a multi-use trail in 1982.
Though it is unlikely that it will ever see rail traffic again, the right-of-way still exists and is ready for reconversion at any time. (though it would require cutting a lot of red tape.)
The Capital Crescent Trail, on the other hand is a railbanked right-of-way which is likely to see railroad use again. Originally acquired by Montgomery County in 1988 from CSX, it was converted to a rail-trail from Silver Spring, Maryland to Georgetown in the District of Colombia.
However, with large new residential and commercial developments in the region, it has become necessary to build new rapid transit lines in the areas served by the trail.
As a result, a large portion of the trail is likely to be rebuilt as the light rail Purple Line of the Washington Metro. This light rail line would also include a mixed use trail paralleling it.
Old rail lines never die, they just get converted to rail-trails.