You should immediately cease the activity you were performing at the time of the sprain. Avoid weight bearing on that leg.
Apply ice as soon as possible (in a wet towel for 10 to 15 minutes). Repeat every 15 to 20 minutes for the first 2 to 3 hours.
Apply compression on your foot and ankle with a tensor bandage. The compression should be greater on the foot than on the ankle. Note that the tensor bandage does not increase the stability of the ankle, it strictly helps minimize the swelling.
Elevate your ankle to help reduce the swelling. Ideally, you should elevate your ankle above your heart to increase the return circulation.