(א) דיני חציצה בנטילה. ובו ד סעיפים:
צריך ליזהר מחציצה שכל דבר שחוצץ בטבילה חוצץ בנטילה...
[ח] "במים יובא" – כולו כאחת. יכול מקצתו? תלמוד לומר (ויקרא כב, ז) "ובא השמש וטהר". מה טהרה אמורה למטן – ביאת שמש כולו כאחת, אף כאן – ביאת כלי כולו כאחת.
8) "it shall be put into water": I might think even part of it (i.e., piece after piece). It is, therefore, written (Vayikra 22:7): "And when the sun sets, he shall be clean." Just as there, the coming (i.e., setting) of the sun is all at once; here, too, the coming of the vessel (into the water must be) all at once.
(א) שלא תהא שום חציצה בגופה ובראשה. ובו צ"א סעיפים
צריכה שתטבול כל גופה בפעם אחת ולא בטבילת חצאין והיינו שתטבול חצי הגוף ואחר כך חצי הגוף השני אלא כולו בבת אחת ואפילו אם מעט מהאצבע קטנה חוץ למים או שיער אחת חוץ למים הוה כלא טבלה ובכל חייבי טבילות כן היא כמ"ש הרמב"ם בפ"יא ממקואות וז"ל כל הטובל צריך שיטבול כל גופו כשהוא ערום בבת אחת ואם היה בעל שיער יטבול כל שיער ראשו והרי הוא כגופו דבר תורה עכ"ל.
ודבר זה הוא מן התורה כדאיתא בת"כ פ' אמור דכתיב ורחץ בשרו במים ובא השמש וטהר ומדלא כתיב וטמא עד הערב כדכתיב בכל המקומות דרשינן מה ביאת שמשו כולו כאחת כלומר כשהשמש נשקעת ונתכסת מן הארץ לא נשאר ממנה אפילו מקצת בארץ כמו כן ביאת מים כולו כאחת ומזה דנין לכל חייבי טבילות:
(נז) וכבר ידעת שהדין הוא שצריך שיהיו מים שכל בשרו עולה בהם (פסחים קט ע"א), דהיינו שיהיו חופין את כולו ולא יצא חוץ למים אפילו כחוט השערה, שכיון שהחצוני נשאר לו צד מקום באיזה אבר שיהיה, אפילו מעט מזעיר, משם תתפשט טומאתו בכל האברים, והרי הוא כאלו לא טבל.
ובהיותו טובל ונכנס כל רמ"ח איבריו במ' סאה, הרי הפשיט מעליו כל צד רוח טומאה, כי בכח אימא לבטל החיצונים, שהיא הנשר הגדול בעל הכנפים דלא דחילת מנץ הטורף וכיוצא.
On the other hand, by chatztitah, even if the chatzitzah is totally blocking a part of the body from water entering there, it is only an issue (MidOraysa) if it the following two conditions are met:
1. It is on most of the body
2. One is makpid on its presence.
The reason is because when the chatzitzah is negligible, the chatztizah is batel to the body and it is as though that immersed body part was toiveled.
After his introduction of the succession of the Rabbinic enactments onto the DeOraysa in the realm of Tevilas Mikva, Mishna Berura explains how this translates into Netilas Yadayim, yin sham.

...כגון צואה שתחת הציפורן שלא כנגד הבשר
Mishna Berura says this cannot be referring to actual "tzoah" for two distinct reasons.
1. A reason related to Hilchos Netilas Yadayim
2. A reason related to Hilchos Chatztiza.
The entire purpose of netilas yadayim, we said in the beginning of Hil. Netilas Yadayim, was because of yadayim askaniyos.
(כֵּיוָן דְּקָחָזוּ דְּקָאָתוּ לִידֵי פְסֵידָא, גְּזַרוּ בֵּיהּ רַבָּנַן טוּמְאָה). וְהַיָּדַיִם — מִפְּנֵי שֶׁהַיָּדַיִם עַסְקָנִיּוֹת הֵן.
...And the hands; the reason that the Sages decreed impurity upon them is because hands are busy. A person’s hands tend to touch dirty or impure objects. Since one does not always pay attention to what his hands touch, and it is inappropriate for holy food to be touched by dirty hands, the Sages decreed impurity.
עסקניות הן - ונוגעין בבשרו ובמקום טנופת וגנאי לתרומה בכך ונמאס לאוכלין כשנוגע בה בידים מסואבות ורבותינו מפרשים חיישינן שמא נגעו [ידיו] בטומאה [ונטמא] וקשיא לי אם כן ניחוש שמא נגע באב הטומאה ונמצא ראשון ויטמאנה ועוד מאי שנא ידים לחודייהו בכל גופו נגזור לפסול תרומה שמא נגעו ידיו בטומאה ונטמא כל גופו ועוד לא תסגי להו בנטילה אלא בטבילה:
The other reason why the Shulchan Aruch is probably not referring to actual tzoah is because one will certainly be makpid of the presence of putrid tzoah on his hands, thus making a chatzitzah.
Nafka Minah between the two reasons (if there is a point) would be if the tzoah is very unlikely to touch the food. According to the first reason, it would be okay, but according to the second reason, it would still be an issue.
---
The Shulchan Aruch goes into the actual substances of dirt which may or may not be a chatzitzah. There are chiefly 2 categories of dirt:
1. Fingernail Sweat/Lightly Adhesive Dirt: Dirt that accumulates "internally" from the sweat of fingernails. (This halacha is special to the area around the fingernails, and will make a difference where on the fingernail it is found)
2. Potter's Clay/Strongly Adhesive Dirt: If one comes in contact with potter's clay, an accumulation can build up.(This halacha applies to any part of the hand where this clay is found, no differences are drawn, unless it is very minute)
(א) דיני חציצה בנטילה. ובו ד סעיפים:
...כגון:
1. צואה שתחת הציפורן שלא כנגד הבשר
2. ובצק שתחת הציפורן אפילו כנגד הבשר
3. ורטיה שעל בשרו
4. וטיט היון וטיט היוצרים
אבל במיעוטו שאינו מקפיד אין לחוש:
הגה ומשום הכי לא נהגו לנקר הטיט שתחת הצפרנים לנטילה משום דהוי כמיעוטו שאין מקפיד כי אין מקפידים על זה לנטילה (הגהות סמ"ק והגהות אשיר"י פרק אלו דברים) אבל אם היה מקפיד הוא צריך לנקר וכן עיקר...
(א) אֵלּוּ חוֹצְצִין בָּאָדָם...
(ב) וּבָצֵק שֶׁתַּחַת הַצִּפֹּרֶן, וְהַמִּלְמוּלִין, וְטִיט הַיָּוֵן, וְטִיט הַיּוֹצְרִים, וְגֵץ יְוֵנִי. אֵיזֶהוּ טִיט הַיָּוֵן, זֶה טִיט הַבּוֹרוֹת, שֶׁנֶּאֱמַר (תהלים מ), וַיַּעֲלֵנִי מִבּוֹר שָׁאוֹן מִטִּיט הַיָּוֵן. טִיט הַיּוֹצְרִין, כְּמַשְׁמָעוֹ...
(1) The following block [immersion] in the case of a person...clots of excrement on the body, dough under the finger nails, sweat-crumbs, miry clay, potter's clay, and road-clay. What is meant by 'miry clay’? This means the clay in pits, for it is written: "He lifted me out of the miry pit, the slimy clay" (Psalms 40:3). "Potter's clay" according to its literal sense...
(ג) אֵלּוּ שֶׁאֵין חוֹצְצִין...
(ד) וְצוֹאָה שֶׁתַּחַת הַצִּפֹּרֶן..
(3) The following do not block...excrement inside the finger nail...
(ג) וצואה שתחת הצפורן. זוהמת הצפרנים:
Although the Rambam is going on the Mishna where "tzoah" is not chotzetz, nevertheless, the definition of it being a substance from the fingernail is what we need from this Rambam to therefore deduce that if this dirt was outside the confines of the space between the fingernail and flesh, it would be a chatztiztah, and this 2-mishna piece up is where the din of our mishna comes.
(יח) צואה שתחת הצפורן שלא כנגד הבשר חוצץ כנגד הבשר אינו חוצץ.
ובצק שתחת הצפורן אפילו כנגד הבשר חוצץ ואי זהו שלא כנגד הבשר זה שהצפורן עודף על הבשר ולפי שאינן יכולות לכוין מה נקרא כנגד הבשר או שלא כנגדו נהגו הנשים ליטול צפרניהם בשעת טבילה:
הגה ומשום הכי לא נהגו לנקר הטיט שתחת הצפרנים
It isn't clear what type of dirt he is discussing (just says הטיט) nor does he state in clear terms where it is found! (תחת הצפרנים, doesn't say if kneged habasar or not)
If so, in what case exactly is the Rema stating the leniency?
In explanation of the Rema the Magen Avraham writes:
(ה) הטיט שתחת. פי' אף ע"פ שטיט חוצץ אפי' כנגד הבשר אין מקפידין ע"ז אבל שלא כנגד הבשר בודאי רוב בני אדם מקפידין אפי' בצואה וחוצץ אף על פי שהוא אינו מקפיד וכמ"ש בי"ד סי' קצ"ח: בשבת אסור לגרר הטיט שתחת הצפורן בצפרניו אלא ירחצנו במים (תשב"ץ סי' קכ"ב) עסי' ש"ב ס"ז:
But shelo kneged habasar, it will be a chatzitzah even by weakly adhesive dirt, since most people will be makpid on that.
(ה) צריך ליזהר מחציצה שלא יהיה טיט או עפר תחת הציפורן מה שיוצא חוץ לבשר אבל מה שהוא תחת הציפורן נגד הבשר אין חוצץ כיון שהוא דבר מועט אין דרך ב"א להקפיד ע"ז אבל שלא כנגד הבשר הכל מקפידין ואף שהוא אינו מקפיד בטלה דעתו אצל כל אדם ובשאר היד הכל חוצץ אם הוא דבר הנדבק (קס"א):
(יט) שלא כנגד הבשר חוצץ. כתב בית יוסף בשם סמ"ג בשם ר"ת שזה דוקא בטיט הדומה לבצק שנדבק מאוד כגון טיט של יוצרים אבל לא בטיט אחר וצואה. ותדע שהרי תנן במקוואות אלו שאין חוצצין לכלוכי צואה שעל בשרו וצואה שתחת הצפורן עכ"ל.
ולא זכר מזה כאן בש"ע להקל כל כך!
ומ"מ נראה לי לתרץ בזה מה שהוקשה לרמ"י בלבוש למה אין נזהרין מזה בנטילת ידים ולפי מה שכתבתי ניחא דודאי לענין טבילת ידים שפיר סמכינן על ר"ת דאינו חוצץ רק טיט היוצרים וכיוצא בו:
The Mechaber in his work "Beis Yosef" does bring the modification of Rabbeinu Tam that only if it is adhesive dirt is it a problem if it is shelo kneghed habasar. But in Beis Yosef's work "Shulchan Aruch" he doesn't bring this kula!
Then he goes ahead to say that although there is no apparent answer as to why in Shulchan Aruch this isn't mentioned, it's still clear from Hil. Netilas Yadayim that this kula exists.
(ה) [ה] ואין דרך להקפיד וכו'. משמע דאם הוא מקפיד צריך לנקרן וכן כתב רמ"א, אבל הב"ח כתב הטעם דסמכינן על הסמ"ג דדוקא בטיט הנדבק כמו טיט של יוצרים שייך חציצה.
וסתם טיט וצואה תחת הציפורן אינו אלא אותו שאינו נדבק, וכן כתב הט"ז ביו"ד שם ס"ק י"ט, וכן כתב שיירי כנסת הגדולה כשצפרנים גדולים ינקרנו, עד כאן...