Solar flares, suddenly releasing a large amount of magnetic energy, are one of the most energetic phenomena on the Sun. For the major flares (M- and X-class flares), there exist strong-gradient polarity-inversion lines in the pre-flare photospheric magnetograms. Some parameters (e.g., electric current, shear angle, free energy) are used to measure the magnetic non-potentiality of active regions, and the kernels of major flares coincide with the highly non-potential regions. Magnetic flux emergence and cancellation, shearing motion, and sunspot rotation observed in the photosphere are deemed to play an important role in the energy buildup and flare trigger. Solar active region 12673 produced many major flares, among which the X9.3 flare is the largest one in solar cycle 24. According to the newly proposed block-induced eruption model, the block-induced complex structures built the flare-productive active region and the X9.3 flare was triggered by an erupting filament due to the kink instability.