I think I used "punch" incorrectly.

1) What do you call the machine into which you insert your train ticket and you get the date and time stamped on it (??).
Before you go on the train, you have to ..... your ticket.

You can use "stamped your ticket."

And Ms.Sue explained this to me: In European train [and subway?] stations, "passengers go through a turnstyle and put their ticket into a machine that punches them before the passengers go on to the platform."

So it seems "punched" can be OK, too, depending on the train station.

Before you go on the train, you have to stamp your ticket. (not "stamped")

The machine you are referring to is commonly known as a "ticket punch" or a "ticket validator." It is used to mark or validate the ticket by punching a hole in it or imprinting the date and time on it. The word "punch" can indeed be used in this context, so you used it correctly!

To get the answer to your question, you can search for terms like "machine that stamps train tickets" or "railway ticket punch." This will lead you to the specific name of the machine: ticket punch or ticket validator. Additional searching might also provide more information about how ticket punches work and where they are commonly used.