A pyramid is a large sandstone structure that spawns in desert biomes. The entrance is usually given away by a path of torches, inside, there is a bedrock maze full of mummies.
In order to beat the pyramid, you must kill the Pharaoh, breaking the curse and earning the achievement. Once done, the bedrock will turn into sandstone and you can leave, upstairs, there is a large empty room full of mutants and mummies with a single bed and two Jack'o Lanterns. This used to be where the Pyramid Guardian was.