Our understanding of gamma-ray bursts (GRBs) has come a long way in the past fifty years since their first detection. We now know that GRBs arise in distant galaxies and that there are at least two distinct sub-classes, the long-duration class being produced by some rare massive star core collapse and the short-duration class likely by compact binary mergers involved neutron stars. In both cases, the final remnant will be a stellar-mass black-hole or a massive neutron star. The bursts themselves are associated with ultra-relativistic jetted outflows created by these events, and their afterglows by the impact of these outflows on the surrounding circumburst material. Increasingly GRBs are also being used as probes of the universe, both for understanding galaxy evolution back to the era of reionization, and for the physics of gravitational wave sources. However, many aspects of GRBs remain poorly understood, some pointers to which are given here.