When a pathogen enters the body, the immune system mounts a response through both innate and adaptive immunity. Innate immunity provides an immediate, but non-specific response, while adaptive immunity takes longer to develop but provides a specific response to the pathogen, including the creation of memory cells for faster response upon re-exposure.