Ancient Egyptians built pyramids as tombs for the Egyptian royals. The pharaohs were buried in pyramids as well as the pharaoh's queens, some people say it was for a different reason (to store grain, to pray, etc.) but that wouldn't explain why their are tombs in the pyramids. Many kings were also buried in pyramids and structures in the Valley of the kings in Egypt, a Famous Egyptian king who was born their was Hatshepsut and Tutankhamun. Here's a pictue of one of the sturcures in The Valley of the Kings.
Hope this helps, have a BLESSED day! :-)