There were two main roots of the cattle boom after the Civil War.
On the demand side of the equation, there was the demand that was coming from the cities of the East. The cities were growing and people were demanding more meat.
On the supply side, there were the railroads. The railroads started to spread out into the Great Plains. By doing so, they provided places where cattle could be brought (from Texas in particular) to be transported to the markets of the East. The most famous of these was the town of Abilene, Kansas, which was essentially created by cattlemen as a place for ending cattle drives and putting the cattle on trains.
The boom, then, was driven by increasing demand from the growing cities in the East and by the expansion of railroads that made it possible to get cattle to that Eastern market.