The answer actually depends on where you lived and what you did for a living. Then as now people tried to feed their pets the most nutritious diet available at the lowest price. If you were a fisherman or lived near a fishing town you might feed your dog or cat things like fish heads, If you lived in a region with sheep you might feed them boiled sheep heads. No matter where you lived there was a good chance that horse meat was also an inexpensive option.
There were general trends though as far as what people preferred.
For cats the general trend was milk or cream when feeding them but usually this was only a supplement to the cats natural diet of rodents and birds. Sometimes table scraps were also provided to the cat.
Dogs generally enjoyed a healthy diet of table scraps and various stews made for them from the less desirable parts of animals for example sheeps head or cow knuckles with potatoes, beets and other vegetables used for filler. There are several paintings from Greek and Roman times showing dogs under the table. (I assume their purpose there was the same as it is now, begging and catching scraps)
In 1860 a lightning rod salesman named James Spratt noticed that dogs loved eating the hardtack biscuits which were made for sailors on voyages. Following this idea he made the first commercial dog food using a similar recipe with a bit more protein. He wasn't the first to realize that dogs loved the hardtack but previous attempts to market the biscuits to pet owners had met some ridicule as sailors were offended that their daily staple was considered fit for dog food.