My phone started hard reset on its own, but I really want to stop it. Is it possible? Because I don't want to lose my files, and it seems there is no way to save them because I tried to connect my phone with my PC so I could save the files but it is not possible.
I highly doubt that your phone would hard reset itself. Although it is possible to reset remotely if you triggered it from your Microsoft account. For windows phones the procedure for update and hard reset is same, spinning gears. It is also possible that the OS is applying some update.
But unfortunately, if it's indeed a hard reset operation, it can not be stopped once started. Unless you have any backups of the device, you wont be able to recover any data from the phone itself, but the memory card may have its data intact.