Look at **broken link removed** which is the Microchip Libraries for Applications (MLA) page and download the library (NOT the Harmony one!). Look at the TCP/IP code (it has support for the WiFi chip you are using).
You will need to look at the documentation and configure the appropriate header files but it is fairly straight forward.
Please do not make this your first PIC application. Start with something simpler and work your way up.
if you download Microchip MLA
**broken link removed**
you should find sample MPLABX projects in the apps/tcpip directory
athernativly try the legacy MLA where there is a MPLAB project