Well, they were simply wild animals. There are in fact still wild dogs today! But yes, they just roamed around usually in packs, and acted like wolves, so to speak. Before man tamed them and became a mans best friend! :)
I was actually reading something about domesticated foxes a little while ago. As the foxes got more domesticated over generations the foxes got more characteristics that humans perceive as cute. My best guess is that, that is what happened to dogs. Humans tried to domesticate wolves over a period of time and they eventually got characteristics that humans found cute, because people would take a liking to cuter looking canines. Eventually, since there was such a concentration of genes that made the wolves cuter looking, they started to look more like dogs today. Humans also started breeding dogs with certain generic variations and mutations that helped them perform a certain jobs which is why there are so many different dog breeds.
Answer Denaturation and Protein Folding. Denaturation is a process in which proteins lose their shape and, therefore, their function because of changes in pH or temperature.
Breeding horses. People want prized racehorses to mate with their females so they can maybe have fast prize winning horses as well. People also use artificial selection in choosing fast horses to make fast colts that can later on race. So they want the best qualities in the colts so they mate the best horses.