I'm specifically curious about how the shortstop came to be. A player for each base, all three fields, one to catch, and one to pitch, are all fairly intuitive, but how did they decide on having a ninth man to stand between 2nd and 3rd?
Before getting into the history of the shortstop, I should point out that, at least the way the game is played today, the shortstop is far from unintuitive. If you look at this diagram of the field positions in baseball, you'll see that the second baseman and the shortstop are positioned about equally far from second base. Because most hitters are right handed, and most hitters pull the ball (meaning a right handed hitter hits it towards the left side of the diamond), the shortstop is often one of the positions that receives the highest number balls hit to it.
This goes back to the very beginnings of organized baseball in the mid-19th century. At this time, there was little formality to the game. The famous Knickerbocker Rules, which were only codified about four years prior do not list the number of players. The standard line-up included the pitcher and catcher (the battery), along with the three basemen, and a couple to handful of outfielders made up a team, generally anywhere from 8-11 players. And when it was only nine players, the trend was for three basemen, four outfielders, and the battery. Again, none of this was completely formal, even the field measurements, like the distance between the base-paths or the shape of the diamond were still not settled completely. It was in this period of flux in baseball history that the shortstop was invented.
Doc Adams is generally credited with inventing the position in either 1849 or 1850. It started more as a short outfielder. Adams originally intended it (it being the position that he was playing) to be a sort of super cut-off man, and so moved further in toward the diamond, no longer in line with the other outfielders. Because of low quality manufacturing, baseballs were not as tightly wound as they are today, making for a ball that was both softer and harder to throw, necessitating in Adams's mind a cut-off man for balls hit deep into the outfield. Soon thereafter, with the increasing popularity of the sport and better baseballs coming to market, the now more tightly wound, harder, and easier to throw baseballs allowed the shortstops to take up a full time residence in the infield.
I can't easily find when the rules were changed to make nine fielders the standard, but it was at some point after the invention of the shortstop, so they're not directly related. Perhaps someone else knows more about it and can shed light upon it. By the time of the first professional team some twenty years later, the Red Stockings, nine was the standard number and the position of shortstop was included. The original 1869 team also included a tenth man, a substitute.