While pyramids exist all over the world, the spectular monuments in Egypt capture the imagination and represent the whole of Egyptian history.
Pyarmids evolved throughout the course of Egyptian history from small mound-like mastabas that morphs into the stepped pyramid in the third Dynasty adn then to various forms of the true pyarmid in the fourth Dynasty, the dynasty of the pyramid builders. Sneferu's early attempts -- the collapsed pyramid of maidum and the bent pyramid -- mark the transformation of the mastaba shape to the true pyramids of Giza. The pyarmids of the fourth dynasty include far more than the major pyramids at Giza, they also include smaller pyramids in Abu Rowash, Saqqara, and Zawiyet-el-Aryan.
Most pyramids have similiar interior structures. An entrance on the east side leads down into the pyramid body, and meets up with a shaft that rises into the pyarmid itself and down to a deep burial chamber. Ihe the Great Pyramid of Giza, the "grand gallery" leads up to an enormous burial chamber (well, probably burial chamber, we never found anyone buried there) and also to a lower 'queens chamber', even though the queens were never buried in the pyramids with their husbands.
In some pyramids, the shafts leading inside go far below ground, to tombs cut into the bedrock itself.
Early step pyramids were built by stacking successively smaller mastaba tombs on top of one another. As the pyramid type progressed, builders tried a number of ways to construct a truly slope-sided monument. THe first attempt seems to be layers of rubble and stone laid against a solid stone core, like layers wrapped around an onion. Each layer was then filled in until the face ot eh pyramid was smooth.
Later engineers realized that this was a poor method of building, resulting in collapse (like the Black pyramid or the pyramid at Maidum) or instability. They progressed to laying the horizontal layers of stone with the stones sloping slightly inwards (as in the red and bent pyramids), but this was also unsatisfactory. The inward leadning stones, instead of making the bulk more stable, actually led to further collapse and too much stress on the stone itself.
Finally, they set upon the model of building flat, even courses of stone resting directly upon the bedrock. This model spread the stress of the millions of tons of stone blocks wevenly and provided a stable foundation for the pyramid.
A fabulous book on the subject is The Complete Pyramids, by Mark Lehner -- definitely worth the read before you go!