Gamma-ray bursts (GRBs) are short but powerful flashes of gamma-rays emitted at cosmological distance. They are followed by a rapidly fading afterglow observed from the gamma-ray to the radio range. GRBs are associated to ultra-relativistic jets emitted by a compact stellar-mass source (black hole or magnetar), formed after the gravitational collapse of a massive star or the merger of two compact objects. I will summarize the most recent observations of gamma-ray bursts and their afterglows, with a focus on their high-energy emission as described by the Fermi satellite, and discuss our current physical understanding of these extreme phenomena. Finally I will also discuss future challenges in GRB studies, especially in the context of the emerging multi-messenger astronomy.