The lyrics of the song are all funny and dumb ways to die. The first four verses are just that, and the last verse[1] are all ways to die related to trains. The general message is that trains are dangerous, and it would be very dumb to die because of one. i.e. to die because you drove around the boom-gates at a level crossing is as dumb as to die from eating a two-week-old, unrefrigerated pie, or to die from taking your helmet off in outer space.
Lyrics
Structure
The song has five verses, with four lines each, except for the bridge, which has six, with five actions and one connection to the final chorus.
Generally, each line is a dumb method of death.