If you are sure it isn't broken (you saw a doctor and had an X-ray, cause this is the only way to be totally sure), then you likely have an ankle sprain - some damage to the ligaments.
If the pain is excruciating, you need to talk to your doctor about a referral to rehabilitation so that they can help you work through your recovery and get you back to basketball.