Brillouin dynamic grating (BDG) has been widely studied since it was proposed for the first time to achieve optical storage in 2007. In general, when two beams of pump light (their frequency difference equal to Brillouin frequency shift of the optical fiber) with the same polarization state are injected into the fiber, the coherent acoustic wave can be excited by the stimulated Brillouin scattering effect, forming a BDG. The BDG in an optical fiber has been widely used in optical fiber sensing, characterization of optical fibers, optical storage, all-optical signal processing, microwave photonics and high-precision spectral analysis due to the advantages of all-optical generation and flexible parameter control. In this paper, we analyze the principle of BDG generation and detection, and its applications in optical fiber sensing. The simultaneous measuring of strain and temperature is achieved within a spatial resolution of 20 cm through measuring Brillouin frequency shift and birefringence-induced frequency shift in a polarization-maintaining fiber. A high-sensitivity distributed transverse load sensor based on BDG with a measurement accuracy as high as 0.810-3 N/mm is proposed and demonstrated, whose principle is to measure the transverse-load-induced birefringence change through exciting and probing a BDG in an elliptical-core polarization maintaining fiber. On the basis of the above research, a distributed measurement of hydrostatic pressure is demonstrated by using a 4-m photonics crystal fiber with a measurement error less than 0.03 MPa at a 20-cm spatial resolution, while the temperature cross-talk to the hydrostatic pressure sensing can be compensated for through measuring the temperature-induced Brillouin frequency shift changes by using Brillouin optical time-domain analysis. A system based on BDG in polarization maintaining fibers is reported to achieve a spatial resolution below one centimeter, while preserving the full accuracy on the determination of temperature and strain through measuring Brillouin frequency shift. Taking advantage of creating a long BDG in an optical fiber, an ultra-narrow bandwidth optical filter is realized by operating a BDG in a single-mode fiber, and the optical spectrometry is performed by sweeping the center wavelength of the BDG-based filter through a swept-tuned laser, where a 4 fm (0.5 MHz) spectral resolution is achieved by operating a BDG in a 400 m single-mode fiber.