They are enslaved
At that time, building the pyramid was regarded as the most labor harsh architectural projects, considering the minimum technological development that exist at that time. Because of this, they obtained a lot of slaves from both Europe and Africa and force them as workers to build the pyramid.