This answer is in addition to nitsua60's and Thomas Markov's answers:
This answer enumerates three broad ways of travel between settings as discussed in the rules
But really, such travel is completely up to the DM and can be incredibly easy or even accidental, the result of a high-level spell, simply not possible, or anything in between.
What the rules say
Tasha's Cauldron of Everything details multiple ways to travel between worlds. The spell dream of the blue veil (p. 106) is an example of one such way.
In Tasha's, the description of the dream of the blue veil spell contains an additional explanatory text box, entitled, "Traveling to Other Worlds".
It starts off:
The Material Plane holds an infinite number of worlds. Some—like Oerth, Toril, Krynn, and Eberron—are well documented, but there are countless others.
It then goes on to list three ways to travel between such worlds:
The Great Journey
Transit between these worlds is rare but not impossible and can be accomplished in various ways. One such method is called the Great Journey, an epic voyage fraught with peril and littered with obstacles to be overcome. This journey most often occurs aboard a vessel powered by magic.
The Dream of Other Worlds
Another method is the Dream of Other Worlds; travelers fall into a deep slumber and dream themselves into a new realm. The spell dream of the blue veil employs this method of transit.
The Leap to Another Realm
The most direct method is the Leap to Another Realm; a spellcaster casts teleportation circle or teleport, aiming to appear in a known teleportation circle or some other location in another world.
Conclusion
The purpose of the spell is to give players permission to move between settings
I don't think it takes much insight to suppose that the purpose of the spell, and the text box, is to explicitly give players (in the broader sense, to include the DM) permission to move between adventure worlds as they would like, and not feel constrained by the rules to a single setting. Specifically, it is telling you, as the DM, if want your players to from one setting to another, feel free! And here's a way we've made for you to do it!
It's entirely up to the DM
Such travels can't happen without the DM's approval. After all, even dream of the blue veil requires "a magic item or a willing creature from the destination world" as a material component. Personally, I find it amusing that you can negate the component by using wish. Take that, DM! Now you have to take me to Eberron! It says so right in the rules!
The DM should not feel constrained by these methods
But really, the DM doesn't need the Great Journey, the Dream of Other Worlds, or the Leap to Another Realm.
You asked, "Additionally, for books where the setting isn't in Toril, if there is a known method to reach the setting from Toril." Hopefully this answer has given some such methods. But don't feel constrained by what's in the rules. If you're a DM, you can make up anything you want. If you're a player, discuss with your DM. If the DM would like, Toril is reachable and can reach to anywhere at all.
If the DM wants to move the adventurers between worlds, any mechanism will do. A vessel powered by magic. A magical dream. A special teleport. A hidden cave. A mysterious artifact. A waterfall. A tornado. A wardrobe. A special train. A magic tollbooth.
Okay, some of those are dumb. They strain credulity and wouldn't work at all.
The method should be as easy or hard as helps the adventure. The method could be accidental or on purpose, one-way or two-way, repeatable or not repeatable, easy or hard, whatever the DM decides will suit the adventure.
Afterthought
For what it's worth, D&D Beyond published an article about dream of the blue veil, entitled Spell Spotlight: Dream of the Blue Veil.