Hi there,
Encyclopedia Britannica Elementary says, "The pyramids of ancient Egypt were tombs. Egyptian kings had themselves buried with gold and other treasure. They had pyramids built partly to keep out people who would steal the treasure."
Have a look at the Ancient Egypt section of the Grade 4 Social Studies on the VLC:
Wonderopolis has a great section about pyramids too.
(Click on the coloured words to get to the websites mentioned!)
Have fun learning!
Mrs M.