The main obstacle in building upward is the downward pull of gravity. Imagine carrying a friend on your shoulders. If the person is fairly light, you can support them pretty well by yourself. But if you were to put another person on your friend's shoulders (build your tower higher), the weight would probably be too much for you to carry alone. To make a tower that is "multiple-people high," you need more people on the bottom to support the weight of everybody above.
This is how "cheerleader pyramids" work, and it's also how real pyramids and other stone buildings work. There has to be more material at the bottom to support the combined weight of all the material above. Every time you add a new vertical layer, the total force on every point below that layer increases. If you kept increasing the base of a pyramid, you could build it up indefinitely. This becomes infeasible very quickly, of course, since the bottom base takes up too much available land.
In normal buildings made of bricks and mortar, you have to keep thickening the lower walls as you build new upper floors. After you reach a certain height, this is highly impractical. If there's almost no room on the lower floors, what's the point in making a tall building?
Using this technology, people didn't construct many buildings more than 10 stories -- it just wasn't feasible. But in the late 1800s, a number of advancements and circumstances converged, and engineers were able to break the upper limit -- and then some. The social circumstances that led to skyscrapers were the growing metropolitan American centers, most notably Chicago. Businesses all wanted their offices near the center of town, but there wasn't enough space. In these cities, architects needed a way to expand the metropolis upward, rather than outward.
The main technological advancement that made skyscrapers possible was the development of mass iron and steel production (see How Iron and Steel Work for details). New manufacturing processes made it possible to produce long beams of solid iron. Essentially, this gave architects a whole new set of building blocks to work with. Narrow, relatively lightweight metal beams could support much more weight than the solid brick walls in older buildings, while taking up a fraction of the space. With the advent of the Bessemer process, the first efficient method for mass steel production, architects moved away from iron. Steel, which is even lighter and stronger than iron, made it possible to build even taller buildings.