You can find the latest installers for Windows, macOS, and Linux on the official Microchip MPLAB XC Compilers page . Purpose of xc.h
#include <xc.h>
: Follow the installation wizard. Ensure the compiler path is added to your system environment if prompted, though the MPLAB X IDE usually finds it automatically.
You can find all compiler versions on the Microchip Compiler Downloads page.