Probably have you hitherto endured a cold virus? Conceivably did you eliminate the cold? Naturally you did! You won't cure a cold directly, yet your immune system normally develops resistance to any type of cold virus within a few weeks. That is called healed by your own immune response!
HPV virus is identical because HPV is just one more virus. And you could simply develop immunity to HPV. Nonetheless, HPV virus is better at concealing from your body's immune system than are the runny nose viruses. Therefore you need to work a little harder to obtain immunity to HPV.