  This paper presents a quasi-local method of studying the physics of dynamical
black holes in numerical simulations. This is done within the dynamical horizon
framework, which extends the earlier work on isolated horizons to
time-dependent situations. In particular: (i) We locate various kinds of
marginal surfaces and study their time evolution. An important ingredient is
the calculation of the signature of the horizon, which can be either spacelike,
timelike, or null. (ii) We generalize the calculation of the black hole mass
and angular momentum, which were previously defined for axisymmetric isolated
horizons to dynamical situations. (iii) We calculate the source multipole
moments of the black hole which can be used to verify that the black hole
settles down to a Kerr solution. (iv) We also study the fluxes of energy
crossing the horizon, which describes how a black hole grows as it accretes
matter and/or radiation.
  We describe our numerical implementation of these concepts and apply them to
three specific test cases, namely, the axisymmetric head-on collision of two
black holes, the axisymmetric collapse of a neutron star, and a
non-axisymmetric black hole collision with non-zero initial orbital angular
momentum.
