It is trespassing and illegal, and you will be subject to arrest if caught. Due to vandalism and theft from shipments, railroad security is more observant than ever. Not to mention increased post-9/11 surveillance… Try Amtrak if you want to ride a train….