For a long time after the Louisiana Purchase, the land west of Minnesota-Iowa-Missouri remained unorganized. No states, and no territories. The southern part of this land had been promised in perpetuity (yeah, right) to various Indian tribes, and partly due to erroneous reports by the earliest American explorers, the land was regarded as subprime for agriculture.
Three things happened to change this in the 1840’s: (1) John C. Fremont explored the Great Plains more thoroughly, and reported they were more fertile than previously thought. (2) The US acquired the Southwest in 1846, meaning that the Plains were no longer Western borderlands, but were in the middle of the country. (3) The Gold Rush turned Western travel from a trickle to a flood, meaning the Plains were vital as a transportation corridor.
But still, when California was admitted as a state in 1850, the Plains were completely unorganized. And so they remained for another four years. The problem now was that the South didn’t want to organize territorial governments for the Plains, because slavery was banned there (by the Missouri Compromise of 1820), and territories would become states, and who wanted more free states?
So Stephen Douglas, in 1854, contrived to bribe the South by opening the Plains to slavery, allowing Congress to create Kansas and Nebraska Territories via the Kansas-Nebraska Act, with slavery legal unless and until the territorial legislatures decreed otherwise.
The Indians, who had been promised the land in perpetuity, were of course shunted aside. Most of the debate in Congress focused on slavery; Sam Houston was one of the only members of Congress who berated the wrong being done to the Indians.
Kansas Territory was roughly similar to modern Kansas, except that it included eastern Colorado to the Continental Divide. Nebraska Territory was a behemoth extending all the way to the Canadian border. It was understood that as this territory was settled pieces would be hived off into other territories and states, as of course they were until Nebraska was reduced to its current boundaries when admitted as a state in 1867.