I once called to say I had missed the last bus, and that I had no cash, no options and a little girl with me.
It was a short, loop route. They notified the driver, and he came back after he ended the route.
Sometimes city bus companies will send a manager out to pick up stranded passengers.
Your options depend entirely on many variables, cash on hand, location, do you have a phone, and many more.