The first flare on the Sun was observed exactly 150 years ago. During most of the long history, only secondary effects have been noticed, so flares remained a riddle. Now the primary flare products, high-energy electrons and ions, can be spatially resolved in hard X-rays (HXRs) and gamma rays on the Sun. Soft X-rays (SXRs) are observed from most stars, including young stellar objects. Structure and bulk motions of the corona are imaged on the Sun in high temperature lines and are inferred from line shifts in stellar coronae. Magnetic reconnection is the trigger for reorganization of the magnetic field into a lower energy configuration. A large fraction of the energy is converted into nonthermal particles that transport the energy to higher density gas, heating it to SXR-emitting temperatures. Flares on young stars are several orders of magnitude more luminous and more frequent; they significantly ionize protoplanetary disks and planetary ionospheres.