This sounds like an over use injury
to the thumb, this causes damage and pain to the tendons that cause the thumb to move. Abnormal movement can cause osteo arthritis
over time. The treatment mainly consists of rest, immobilization , cold
pack daily, elevation above your heart whenever you can(also when sleeping) and anti-inflamatory medication. Once the pain has settled see someone for physio therapy.