The core rule of chatzitzah, which Birkei Yosef (Yoreh De'ah 198) analyzes in depth, is that an interposition on most of the body or most of the hair, which the person cares about removing, invalidates immersion on a Torah level, while the same barrier on a minority of the body does not — though the Rabbis extended the prohibition further. Eruvin 4b derives this from the pasuk requiring that "all his flesh" enter the water, and states the rule of Rabbi Yitzchak that a majority-barrier one cares about is a Torah-level chatzitzah, while a minority one is not, with the Rabbis decreeing even on an uncared-for majority.
The Tur (Yoreh De'ah 198) and the Beit Yosef (Yoreh De'ah 198:2-4) codify this distinction practically: anything that most people typically care about — even a tiny amount — constitutes a barrier regardless of whether this particular woman cares, while something covering most of the body is a barrier even if people generally don't mind it; the Tur lists tightly-wound wool and flax threads, and hairbands, as examples, excluding loose neck-threads.
The Mishneh Torah (Immersion Pools 1:12) and the Arukh HaShulchan (Yoreh De'ah 198:4-8) state the same halacha in Rambam's language: a barrier covering a majority of the person and cared about invalidates immersion on a Torah level, while the Rabbis decreed stringency even for a minority that one cares about, leaving only a minority not cared about as unaffected.
On the specific question of hair as distinct from the body, the Mishneh Torah (Immersion Pools 2:15) and Chokhmat Adam 119:3 discuss whether hair is judged together with the body or as its own category for determining a 'majority,' with Keren Orah (Eruvin 4b) and Sfas Emes al HaShas (Eruvin 4b) analyzing the competing positions of Rashi and the Rambam on whether a majority of hair alone, separate from the body, constitutes a Torah-level barrier.
The Mishnah and Gemara sources furnish the concrete cases behind these principles: Mishnah Mikvaot 9:1 lists wool threads, flax threads, and girls' head-ribbons as barriers (with Rabbi Yehuda disputing wool and hair ties since water penetrates them); Shabbat 57a and Niddah 66b discuss loosening such ties before immersion and bringing the case of a bone found stuck between teeth after immersion, which required a second immersion; and Menachot 21a and Zevachim 98b extend the rule to dried versus moist substances like blood, ink, honey, and milk, and to grease or blood stains that a craftsman is not particular about.
Shulchan Arukh (Yoreh De'ah 199:1) and Shulchan Arukh (Yoreh De'ah 198:23) apply these principles practically: a woman must wash and comb thoroughly before immersion so that hair does not stick together, and rings, necklaces, or bandages are barriers only if tightly fastened, not if loose.
The Beit Yosef (Yoreh De'ah 198:24) further addresses whether the law requires water actually reaching hidden places (bet ha-setarim) or merely that they be fit for water to reach, citing the Rosh's stringent position to be careful about all such areas lekhatchilah even though the strict halacha may be lenient bedi'avad.
Among later poskim, Rav Mordechai Eliyahu (Darchei Tahara 15:25) rules that if a woman checked hidden places like the teeth, nose, ear, and underarm after immersion and found nothing interposing, the immersion is valid, since such places need not come into direct contact with the mikveh water during the immersion itself but only be clean and fit for it.
Rav Mordechai Eliyahu (Darchei Tahara 16:23) addresses the case of a woman with ear pain who cannot let water enter, permitting a loosely-placed moistened finger or oil-soaked cotton in the ear as not constituting a problematic barrier, and Rav Mordechai Eliyahu (Maamar Mordechai Limot HaChol 14:6) discusses covering the heart or head with one's own hand versus another's hand for modesty during immersion, and clarifies that one's own arms can serve as a permissible separation between heart and nakedness by embracing the body.
Shevet HaLevi (Shevet HaLevi 10:150) rules on the practical distinction between a barrier covering the entire body, which invalidates the immersion entirely since no water touches the body at all, and a barrier on a lesser area where the rest of the body is properly immersed, treating these as fundamentally different cases.