It would depend on a range of factors, including the type, size and shape of the bow, its materials, how soon you expected to use it, etc.
Some general considerations:
If you didn't expect to use it for a while, you would unstring the bow to relieve the tension. Bows that are constantly under tension lose their elasticity after a while and become weaker. This is especially important for wooden bows, less so for composite bows.
The weather was important. If it was raining or if there was danger of rain, you would unstring the bow and put the bowstring in a waterproof pouch. This is because bowstring was often made of sinew or rawhide, which stretch and break when they are wet. Most bows with bowstrings made of sinew became useless in the rain.
If the bow was strung, you might carry it looped over your shoulder or on your back. A bow looped over your shoulder is unwieldy and hinders the free movement of your arms, so this was probably a temporary solution. If you expected to carry it for any length of time, you would probably securely strap it across your back.
The length of the bow matters. English longbows were 5 or 6 feet long. At a time when most people were relatively short, a bow slipped over your shoulder would drag on the ground, so you would probably unstring it and strap it across your back like a long stick.
Mongol horse archers often carried two bows - a short bow to use while on horseback, and a longer bow to use on foot. The longer bow was strapped to the back, the shorter one might be looped around the shoulder, attached to the saddle, etc.
Medieval illustrations of Mamaluks show the bows being carried vertically, but they were probably carried in bow holsters attached to the horse, kind of like this.
People are pretty inventive, so probably they figured out other ways to carry them as well. But the general considerations remain the same. Bows are large and unwieldy. They get in the way of free movement. Leaving them strung for too long weakens them. Wet weather can render them useless. Carrying them securely strapped across your back is best in terms of getting them out of the way so they're not hindering your arm movements or constantly bumping your legs or in danger of slipping off. Of course, carried like that makes them harder to get to, so if you expect to use it soon, you might trade some comfort and convenience for quicker access, in which case you might sling it over a shoulder, or if you are mounted, put it in a holster or other receptacle attached to the horse rather than to yourself.