To turn your PC to a local web server you have to download XAMPP like software to your PC. Download process of this software is very easy. From www.apachefriends.org you can download the installer file for your os (Windows/Linux/X) and then you can install it to any drive. If you have previously downloaded the software before then remove the old file first and then reinstall it.
If your download process is completed then you have to open XAMPP control panel and then start Apache and MySQL.
That’s all, Now you are running a local web server on your personal computer. Now you go to your browser and write localhost or 127.0.0.1 and press enter. If you correctly went through the process then you can see a webpage and it doesn’t matter you are offline/online. You have successfully installed the software.