The ancient Greeks knew how to lift objects, using pulleys and winches. A pulley is a grooved wheel that a rope can slide over. A winch is a machine that has a broad wheel, or drum, with a rope fastened to it. By turning the drum with a crank, the rope can be wound up on the drum or let out. By running the rope over a pulley, it can be made to raise or lower a load.
In the 17th century, a "flying chair" was invented. It was designed to carry people to the top floors of buildings and was operated by a system of weights and pulleys. The chair and its machinery were outside the building. The "flying chair" never became popular.
During the first half of the 19th century, elevators were already in existence but they were mostly used for freight. Steam power was used to turn the hoisting drums of these elevators.
What people were afraid of was that the rope holding the elevator might snap and the elevator would go crashing down. Then Elisha Otis invented a safety device that prevented this from happening, and elevators became popular. Also, at this time hydraulic power (fluid under pressure) began to be used to raise and lower elevators.
The electric elevator, which is what is used today, was developed by the German engineer, Werner von Siemens.