It might be a sprain or a fracture, both of which behave almost similarly.
Need an X-ray to rule out fracture.
Next Steps
Get a X-ray followed by a consultation.
Till then, keep the affected leg up most of the time.
Apply Ice packs and pain relief spray.
Apply crepe bandage to the affected foot and ankle.
Continue the same tablet if it's too painful, but get the x-ray for greater clarity.