How did they catch the first ones? How did they train them?
Well, there are only hypotheses about this, because there isn't any solid evidence prove anything. We know there are cave paintings of horses that are thousands of years old, but that doesn't tell us much.
We're pretty sure that early humans used hunted horses for meat. And then we're not really sure how they got from eating them to using them, so I won't speculate (I like to think of an early cave man trying to tackle one and then getting carried off). One researcher thinks that humans took foals from mares that they killed.
But, around 3000 B.C.E, archeologists and researchers started seeing wear on horses mouths that might have been caused by bits, and by 2000 B.C.E., they found horses buried with chariots.
So, between about 4000 and 2000 B.C.E., humans started capturing, raising, and breeding horses. Somewhere along the line, they started using them, probably first as pack animals, and then as draught animals, and then eventually as riding animals.
As for training, well, we don't have a clue. The earliest training manual we have is from Xenophon's text (about 430BC), and the earliest we know of is Simon's text on chariots.
But, assuming that horse brains haven't changed very much, they've probably used many of the same methods we use today (i.e. comfort if the animal complies, pain if they don't).
Sources:
Marsha A Levine, McDonald Institute for Archaeological Research, Cambridge
David W. Anthony,
As this predates our records you might want to ask this in /r/askanthropology (do check their FAQs beforehand).