I believe they used complex pulley systems. It's fascinating--and it must have been hard work!
There is also a revisionist (based on research) notion that the pyramids weren't built by slaves, but by farmers who needed some extra money, and were recruited by employment agents.
Ever wish you could ride a camel?