The microscopic dynamics of real sandpiles forms the focus of this article, with particular reference to dilatancy and hysteresis, which are of fundamental importance in the characterisation of granular systems. The competition and cooperation between independent-particle and collective excitations is examined using novel theoretical and computational techniques. These methods yield a wealth of detail on the microscopic structure of granular flows, as well as on the static configurations that these generate.