You have more options than you probably think, and they differ by country, so here is the general landscape. Station ticket machines are the universal fallback; most have an English language option and take cards. Staffed ticket counters still exist at bigger stations and are worth using your first time, since a human can explain which pass actually suits your travel pattern.
The direction everything is moving, though, is mobile. Most transit authorities now sell tickets and passes through their official app, and in many cities you can skip tickets entirely and just tap a contactless bank card at the gate, which is the simplest possible start for a newcomer. Convenience stores and kiosks sell tickets or top up transit cards in many countries too, which surprises people.
Two cautions from experience: buy only from official machines, counters, apps, or authorized sellers, never from individuals hanging around stations, and check whether your ticket needs validation before travel, because holding an unstamped ticket counts as traveling without one in several systems.