Ice packs can help to minimize swelling around the injury, reduce bleeding into the tissues, and reduce muscle spasm and pain. Applying an ice pack early and often for the first 48 hours will help minimize swelling and decreasing swelling around an injury will help to control pain.15-20 minutes has been shown to be the most effective time to use ice for an acute injury.
How icing helps in detail
swelling is one of the signs of infalammation. Inflammation involves release of histamine by mast cells present in the tissue.Histamine causes vasolidation and leads to leakage of fluids from blood along with which neutrofils and other WBCs also enters the area.
They phagocytes microbes that might have entered with the injury.
Applying ice would cause vasoconstriction(narrowing of blood vessels)which would reduces leakage of tissue fluid and hence swelling.