It could be a few things. I am thinking of arthritis, or maybe a strain, sprain, or dislocation. Do you crack you knuckles or so any sort of repetitive movement that involves your thumb?
No matter what it is, you can relieve the pain by not using it and letting it rest....stop doing whatever moves it. You can also use a heating pad and cold soaks to speed up a healing process.