Railway trespassing is a growing problem in both rail and road transport. A high percentage of rail accidents are a result of the former. Factors that contribute to trespassing accidents range from poor decision-making by the trespasser and general ignorance of rail traffic rules to poor infrastructure (e.g., a lack of fences along tracks to prevent trespassing). The objective of this study was to provide a systematic review of the known literature on the problem of trespassing on railway tracks. The methodology implemented for literature collection was in accordance with the PRISMA method. The literature was searched using keywords: railway trespassing, railway trespassing accidents, trespassing factors, trespassing prevention, railway trespassing detection, and railway trespassing education in the Web of Science Core Collection and an additional search was conducted through other literature databases. The starting point was the collection of n = 291 studies of which a total of 72 publications were included in the literature review ranging between 1953–2023. The literature review consisted of 73.6% journal papers, 18.1% conference papers, and 8.3% expert reports. The results were the formation of: (1) Factors that influence the occurrence of trespassing accidents: (a) locations of frequent railway trespassing, (b) the temporal frequency of railway trespassing, (c) trespasser profile and behaviour, (d) motivation for and general knowledge of railway trespassing, and (e) other factors and models for railway trespassing accidents; (2) Measures for trespassing prevention: (a) education measures, (b) signalization, technological and infrastructure measures for trespassing prevention, and (c) pilot studies of railway trespassing preventive measures. The main findings were summarised and discussed with considerations for future work.