Fault surfaces are characterized by an inhomogeneous friction distribution, that can be represented with asperity models. Fault mechanics is dominated by asperities, so that a fruitful approach is to use discrete models, where asperities are the basic elements and the state of the fault is described by the average values of stress, friction and slip on each asperity. Under reasonable assumptions, the equations of motion can be solved analytically, with a deeper understanding of the behavior of the system. Fault dynamics has a sticking mode, where asperities are stationary, and a number of slipping modes, corresponding to the separate or simultaneous motion of asperities. Any seismic event is a sequence of slipping modes and a large variety of source functions is possible. Many large earthquakes are observed to be the consequence of the failure of two asperities: a discrete two-asperity model shows a rich dynamics and allows a detailed study of interaction between asperities. In this framework, fault evolution during coseismic and interseismic intervals can be calculated in terms of fault slip, stress state, energy release and seismic spectrum, including viscoelastic relaxation, fault creep and stress perturbations from other faults. Discrete models may include interaction between neighboring faults, allowing to assess conditions for the occurrence of seismic sequences in a fault system. A review of recent work on this subject is presented with applications to real earthquakes.