Thanks for your query.
According to your description , pain and swelling over your ankle seems to be inflammatory in nature. It could be due to an acute attack of gout
or blood clot.
I advice you to give you rest to the part affected, take anti-inflammatory drug like motrin
1 tablet with food as and when required (upto 4 tablets daily) to reduce pain and inflammation and consult your doctor for thorough examination of ankle and rule out any infective cause.
I do hope that you have found something helpful and I will be glad to answer any further query.