We provide a comprehensive review of major developments in our understanding of gamma-ray bursts, with particular focus on the discoveries made within the last fifteen years when their true nature was uncovered. We describe the observational properties of photons from the radio to multi-GeV bands, both in the prompt emission and the afterglow phases. Mechanisms for the generation of these photons in GRBs are discussed and confronted with observations to shed light on the physical properties of these explosions, their progenitor stars and the surrounding medium. After presenting observational evidence that a powerful, collimated, jet moving at close to the speed of light is produced in these explosions, we describe our current understanding regarding the generation, acceleration, and dissipation of the jet. We discuss mounting observational evidence that long duration GRBs are produced when massive stars die, and that at least some short duration bursts are associated with old, roughly solar mass, compact stars. The question of whether a black-hole or a strongly magnetized, rapidly rotating neutron star is produced in these explosions is also discussed. We provide a brief summary of what we have learned about relativistic collisionless shocks and particle acceleration from GRB afterglow studies, and discuss the current understanding of radiation mechanism during the prompt emission phase. We discuss theoretical predictions of possible high-energy neutrino emission from GRBs and the current observational constraints. Finally, we discuss how these explosions may be used to study cosmology, e.g. star formation, metal enrichment, reionization history, as well as the formation of first stars and galaxies in the universe.