The tags railway=razed, railway=dismantled and railway=historic are used to tag a former railway, where mostly all evidence of the line has been removed. None of those Tags are considered a standard by a majority of mappers, some even consider them to differ slightly in what they mean.
Most mappers follow a basic Good practice#Map what's on the ground principle, and therefore regard the mapping of non-existent railways as incorrect data placed in the OpenStreetMap database. On the wiki this is discussed at Talk:Railways#Abandoned railways where all evidence has been removed and multiple times on mailing lists, see for example 
Of the tags below, only railway=razed and railway=abandoned are rendered on OpenRailwayMap.
Overall, mapping such features is acceptable where some remains like embankments, remains of bridges, etc., remain, even if rails are gone. In locations where the railway has been replaced by new buildings and roads, the mapping of such features becomes out of scope for OpenStreetMap. Historical mapping can occur on Open Historical Map.
There is controversy as to what constitutes sufficient remains of a railway for mapping. Everyone agrees that overgrown railway rails remain mappable.
A borderline case may be where a railway was dismantled and replaced with a road of the same geometry.
What is sufficient to map a former railway
Mapping of completely non-existent railways is considered as out of scope for OSM. But railways leave long-lasting traces and some mappers consider even small vestiges of rail as being sufficient for mapping very broadly.
Recognizable signs of a former railway include features such as terrain shape (cuttings and embankments), remaining characteristic ballast, and/or track ties. Some mappers consider more indirect traces such as buildings or road alignments as sufficient grounds for mapping a railway which has been removed.
Location of a former railway and railway station without any traces whatsoever. Not mappable.
|The wiki definition: Is a key to map former railways, where the rails have been removed but the route is still visible in some way.||The old-wiki definition: Is a key to tag a former railway, where all evidence of the line has been removed. It may have been replaced by new buildings and roads that don't refer to the old alignment, or may have been returned to farmland. 2||The old-wiki definition: If it is impossible to guess the former route use railway=dismantled instead. 1||A wiki definition never existed. But there are historic=railway (on page historic) or historic=railway (on History-Map).|
There are many, add not listed here.
- "razed railways and other things that don't exist today" on OSM-talk mailing list
- Seltsame Tags für Verkehrswege in the German section of the OSM-Forum
- Voormalige trambaan Voorne-Putten] in the Dutch section of the OSM-forum
General historic mapping: