Yes, I am aware that the answer is, "in a stable". I am interested in a more detailed and specific answer than this. Did houses have tiny stables instead of garages? If someone left his horse at a private stable downtown overnight, did he receive a parking ticket? What are the mundane, specific details of life in a pre-automobile urban centre that we wouldn't think of today? Etc.
Timeframe: Let's say we're talking from the invention of the steam engine to the widespread adoption of the Model T, just to be inclusive.
This answer focuses on American cities.
Through the 19th century into the automobile age, the vast majority of urban residents did not own a horse. The largest cities had, on average, around one horse for every 23 people at the turn of the century, near the peak of urban horse use. They commuted by walking, by omnibus, by horsecar, or by trolley. Most urban horses were owned by commercial and municipal operators, and were used to haul freight, passengers, and fire apparatuses. In addition, horses in urban environments were rarely ridden (nobody wants to show up to work smelling like horse, or with bow-legs); most individuals who owned a horse used it to hitch a private carriage.
As early as the 1920s, the number of automobiles in cities far exceed the horse-count at its height. St. Louis recorded just under 30,000 horses in 1902; by 1920, it had nearly 50,000 automobiles. Considering that many horse-drawn vehicles require a team of 2 or more horses, it's evident that actual traffic numbers by vehicle would be significantly lower. A survey of traffic at Locust St. in St. Louis in 1885 tabulated 845 vehicles in a day - by 1913, this had risen to 3,496. Similar surveys conducted across the country returned roughly equivalent figures - the lowest traffic increase I have data for is at Broadway in NYC, which saw a meager rise from 1,666 to 3,277 (not even 300% - sad!) vehicles daily between 1885 and 1913.
So, part of the answer to your question is that there was simply less vehicle traffic in cities before the automobile. But what about the horses that did live in cities?
The majority of urban horses Would have been owned by commercial or municipal enterprises, not private individuals, and would live in their own stables. Private horse-ownership was extraordinary expensive: a mid century tandem carriage cost about $1200, and a team of horses cost at least $2000 - higher than the annual income of most engineers and doctors. A horse also required a stable hand to tend it and usually a coachman to drive the carriage, and private stables at home and near work took up valuable urban real estate.
So where did private carriage owners park? Well, by and large, they didn't. A horse is not something that you can just leave unattended in an urban environment: they can be stolen, they can run away, they can bite and kick passers-by. Carriages were recreational vehicles for the most part - commuting in private carriages was reserved for only the wealthiest carriage owners, whose coachmen would pick them up and drop them off at work.
As for some interesting details of urban life before the auto age:
This information comes from chapter 3 of Down the Asphalt Path: The Automobile and the American City by Clay McShane.