X-ray observations of active galactic nuclei and black-hole binaries offer a unique laboratory for testing general relativity in the strong-gravity regime, for studying accretion physics around black holes, and for constraining properties of accreting black holes. This book represents the author's Doctoral Thesis. It contains a brief introduction to the black-hole physics and X-ray astronomy as well as the original scientific results. A special attention is focused on black hole spin measurements employing the relativistic iron line profiles in the X-ray domain.