How the body differentiate between a foreign and a native protein?

Suppose there is a bacteria, it has lot's protein on its membrane, with specific structures. How does our body know it's the foreign protein? How does it know, the particular configuration is native or foreign?

  • 1
    $\begingroup$ Welcome to SE Biology. Please finish reading the tour to find out about this site, and the Help on Asking Questions. You will see that you are expected to do some research before posting, and such research would make it clear that there are whole books written on this topic, and it certainly is not possible to explain it in less than a book chapter. Unfortunately that does not make your question suitable for this list. Any brief answer here is unlikely to be as useful as professionally written and illustrated resources. $\endgroup$ – David Sep 11 '20 at 16:32
  • $\begingroup$ Can you please suggest me any book? I am new to biology. $\endgroup$ – Aditya Shrivastava Sep 12 '20 at 1:42