It would be better if you were more specific about the swelling as it could be caused by multiple reasons. You treat the cause of the swelling not the symptom of swelling. If it is a sprain or something then ice is suggested initially. If it is swelling due to infection, the fluid she be removed and antibiotics used after thourough cleaning. Most likely your answer would be ice. If the injury is older than a couple hours, then take some asprin and keep from using the effected area. Also I suggest Tiger Balm it will really help sprains and pulled muscles and that sort of thing.
It depends on what the cause of the swollen joint is related to as sometimes Ice is the remedy and other heat; a lot depends on the type and cause of the swelling and injury.