On trains usually yes : S-Bahn in Berlin for example or Elizabeth Line and Overground in London. But it is usually not worth it to use a pass day, much better to buy a daily city pass or something like that which is also valid on buses, subways,…
In Paris nothing is included, not even the RER trains.
In London it's much better to buy a Oyster card or use a contactless credit card !
If you have a “continuous” pass (i.e. valid on all days from start to finish) then obviously you would use your pass for all valid trains, wherever. AS above if you have a Xdays in Y months it is usually better to buy a city ticket or pay as you go.
Every city is different on what is and what isn’t included, but as a general rule if the service is part of the RAIL service it will be included, but if part of the METRO or UNDERGROUND service it won’t be included.
It is also worth noting that where local services are included (e.g. S-bahn in Germany) you still need to add each journey, no matter how short, into your trip and activated in your pass, unlike most hop-on Hop- off city passes.