Time of injury
That depends on how long ago your ankle was injured.
If it is in the past several days and it generally is getting better than you can wait. If it has been several weeks then i would suggest a consultation with an orthopedic surgeon. If your swelling has been going on for years or is in both legs than i would first see my primary care doctor.