My thumb or my pointer finger locks in place when I keep it straight for a min ots hurts and I can't moce it until its stops hurtin help?

Trigger finger. This is due to contracture of a fibrous pulley for the finger muscle and occasionally a swelling of the tendon. It can be minimized by elevating the limb which allows gravity to drain the fluid. But sometimes needs treatment with steroid injection or surgical release. See your hand surgeon for evaluation and treatment.
Trigger fingers. Per your description, you have trigger/lokcing fingers. This can be quite painful. It is caused by thickening and roughening of the "pulley" aparatus that catches the tendon as it tries to slide through..Motrin/aleve in adequate dosage and stretching exercise may help, but often need medical intervention--injections and/or surgery. Consult your doc... Good luck.