The grating is written into the photosensitive core with UV laser light, typically through a phase mask. The result is a stack of thousands of index modulation planes, each reflecting a tiny fraction of the passing light. For most wavelengths these micro-reflections are out of phase and cancel. At one specific wavelength they interfere constructively, and the grating behaves as a highly selective mirror.
That wavelength is the Bragg wavelength, set entirely by two physical quantities: the effective refractive index of the core and the spacing of the planes.