I have written an applet simulating the Sandpile Model of Bak,Tang, and Wiesenfeld (BTW model).  Sandpile model is a paradigm of Self-Organized Criticality (SOC). It is a cellular automaton whose configuration is determined by the integer variable z(x,y) (the height of the "sand column") at every site of the lattice (here we consider the 2D lattice). The dynamics is defined by the following simple rules: A grain of sand is added at a randomly selected site: z(x,y) -> z(x,y)+1; Sand column with a height z(x,y)>zc=3 becomes unstable and collapses by distributing one grain of sand to each of it's four neighbors. This in turn may cause some of them to become unstable and collapse (topple) at the next time step.  Sand is lost from the pile at the boundaries. That is why any avalanche of topplings eventually dies out and sandpile "freezes" in a stable configuration with z(x,y)<=zc everywhere. At this point it is time to add another grain of sand. Starting with an arbitrary configuration and repeating the above procedure brings the system to a stationary state, where for every grain of sand added to the system on average precisely one grain of sand is lost at the boundary. It is clear that the system in this state must have large avalanches. Indeed, addition of  a grain of sand at one of the central sites would not cause the loss of sand (which is required by stationarity) unless the chain reaction of topplings isn't able to propagate all the way to the boundary, which is exactly the definition of large (system-wide) avalanche. It turns out that in this delicately balanced steady state the distribution of avalanche sizes (measured as total number of topplings in the avalanche) follows a scale-free power law distribution: P(S) ~ S-1.2 .   In other words, the system operates in a critical state (in the sense of equilibrium physics of second order phase transitions). Notice that this critical state is a unique attractor of the dynamical rules, conserving sand everywhere except for the boundaries. Hence the name Self-Organized Criticality. If your browser supports JAVA you can go and play with a 2D sandpile model, or learn about the origin of 1/f noise in quasi-1D sandpile models,  which was the subject of my paper with Chao Tang and Yi-Cheng Zhang.