While modern trains won't litter the tracks with human excrement, the traditional method did just that. This is what was known as a hopper toilet. It could either be a simple hole in the floor (also known as a drop chute toilet) or a full-flush system.