In MPLAB X you would create a project which contains references to lcd.c and also prtest.c (which is the name of the source file above). When you select the Build option, XC8 will compile all the files in the project and build our program.

MPLAB X will let you create many project files, each with a different set of member files. Once you have your LCD code working you can use it in lots of different programs by simply putting the lcd.c source file in the project and including the lcd.h file in the program which wants to use the source.

We will actually do this later on when we write some code to drive the liquid crystal display unit.