They used a ramp, obviously, but in this video John Heisz demonstrates (with little wooden blocks!) a method of lifting the stones and ramping against an under-construction pyramid that's more efficient that those often proposed: How I Would Build The Great Pyramids.
The fact is no-one knows for sure how they did this. … I know one thing for certain, though. It wasn't with the help of aliens from outer space.