How do I find out why I'm having pain in my toe joints?

You see a dr. Xrays, clinical exam and possibly blood work may be done to help find the etiology of your pain.
Joint pain. Any foot and ankle specialist will be able to give you the correct diagnosis and specific plan you need. Best wishes!