The Eurostar to/ from the UK has airport-style check-in at your origin station (security + both sets of passport checks). Check in closes 30 minutes before departure, but you should aim to arrive at least 60 minutes before departure.
https://www.eurostar.com/us-en/travel-info/your-trip/check-in
All other borders within the Schengen area are pretty much non events. Most of the time, you’ll pass through without even noticing you’ve crossed a border. But there are sometimes passport checks on the train. You don’t need to leave any extra time for this.
If you travel beyond the Schengen area, to the south or east, you should expect border checks. Sometimes done onboard the train, sometimes you have to get off. These checks are generally built into the timetable of the train you’re on, to allow sufficient time. Sometimes on night trains, you give your passport and ticket to the attendant, and the border control happens while you’re asleep!