Are you sure you want to start with a PIC16F877A ?
That chip is over 24 years old, and there are much better, cheaper, more powerful alternative PIC16F devices available now.
The MPLABX IDE and XC8 compiler are free, but you will need a programmer to burn programs into the PIC.
You can pick up a complete development board for a PIC16F18877 for USD$19, and it has an embedded programmer built into it!
https://www.microchip.com/en-us/develop ... l/DM164142