When a pathogen or a foreign agent enters our body, the cells of immune system migrate to that area of pathogen entry. This is facilitated by histamine which induces vasodilation for these cells to migrate. Migration of these cells to that location causes inflammation or swelling.