I want to get something straight, you said that the Doctor said that you had HPV, not an abnormal pap smear, correct? If that is correct then the Doctor probably wanted to stress the importance of coming in yearly to be screened since it has been 6 years since your last pap. Yearly visits will make sure that the HPV doesn't cause any precancerous changes to the cervix.
HPV is what I call the quiet STD. Nearly everyone has it, but nobody talks about it, at least not until recently. I had never heard of it till I had an abnormal pap and started doing research about what could have caused it.
As the other post indicates HPV can lay dormant for many years and it's almost impossible to track down how you got the virus. The important thing is you know that you have it and will stay up with your paps to make sure it doesn't cause changes. Not all strains of HPV do cause changes.
However, if you did have an abnormal pap, do take the advice of the other poster and follow up soon.
Hope this helps!