This chapter describes a simple computational idealization of a sandpile. When sand trickles slowly through your fingers, a small conical pile of sand forms below your hand. Sand avalanches of various sizes intermittently slide down the slope of the pile, which is growing both in width and in height but maintains the same slope angle. The pile of sand is a classic example of self-organized criticality. The chapter first provides an overview of the sandpile model before discussing its numerical implementation and a representative simulation involving a small 100-node lattice. It then examines the invariant power-law behavior of avalanches and the self-organized criticality of a sandpile. The chapter includes exercises and further computational explorations, along with a suggested list of materials for further reading.