Have you never taken public transit before? You're one of today's lucky 10000: https://xkcd.com/1053/
Pre-smartphone, or if you don't have a signal, you check the posted timetable. In any decent good transit system, every stop, even the tiny bus stops in the middle of nowhere, has an up-to-date timetable on display. In a complicated area with several lines, they may also have a map showing all the different lines.
Or - ask a human! A bus is driven by a driver, and they aren't omniscient, but they do know stuff because they have to drive buses every day. Worst case, they could point you to the right place to find routes and timetables. If they've got an hour to kill before they drive the next bus back, they know that.
Post-smartphone, you get out your smartphone and check the transit operator's website or app. Transit apps are pretty useful: input where you want to go, and it tells you the fastest route to get there, including where you need to change to a different vehicle. I normally use the app from my local transit company (BVG), or the nationwide one (Deutsche Bahn) for long-distance trips; aggregators like Google don't always have the latest information. In Germany there is some kind of data-sharing program run by the government so that any transit company can give you accurate information for any other company's services and plan a route involving multiple companies. This might not be the case where you live.