This process, I believe, is called phagocytosis.
This process is accomplished by phagocytes, a type of white blood cell found in bone marrow. These cells help to protect the body by engulfing foreign particles such as pathogens (including bacteria).
I hope this helps! I'm happy to help with any other questions you might have :)