X-Ray Diffraction for Materials Research: From Fundamentals to Applications