Muons produced in atmospheric cosmic ray showers account for the by far dominant part of the event yield in large-volume underground particle detectors. The IceCube detector, with an instrumented volume of about a cubic kilometer, has the potential to conduct unique investigations on atmospheric muons by exploiting the large collection area and the possibility to track particles over a long distance. Through detailed reconstruction of energy deposition along the tracks, the characteristics of muon bundles can be quantified, and individual particles of exceptionally high energy identified. The data can then be used to constrain the cosmic ray primary flux and the contribution to atmospheric lepton fluxes from prompt decays of short-lived hadrons.In this paper, techniques for the extraction of physical measurements from atmospheric muon events are described and first results are presented. The multiplicity spectrum of TeV muons in cosmic ray air showers for primaries in the energy range from the knee to the ankle is derived and found to be consistent with recent results from surface detectors. The single muon energy spectrum is determined up to PeV energies and shows a clear indication for the emergence of a distinct spectral component from prompt decays of short-lived hadrons. The magnitude of the prompt flux, which should include a substantial contribution from light vector meson di-muon decays, is consistent with current theoretical predictions. The variety of measurements and high event statistics can also be exploited for the evaluation of systematic effects. In the course of this study, internal inconsistencies in the zenith angle distribution of events were found which indicate the presence of an unexplained effect outside the currently applied range of detector systematics. The underlying cause could be related to the hadronic interaction models used to describe muon production in air showers.