One whose nails are overgrown should cut them before the festival. However, according to most poskim, if he did not do so, he may cut them be-di’avad during Ḥol Ha-mo’ed. It is permitted as it is considered a bodily need, and bodily needs may be taken care of on Ḥol Ha-mo’ed (Rif; Rambam; Rosh; Smag; SA 534:1). Others are stringent and state that just as the Sages forbade getting haircuts during Ḥol Ha-mo’ed, they also forbade cutting nails. The logic is the same; the Sages wanted to encourage people to look their best before Yom Tov (Smak; Sefer Ha-teruma).
Even though the primary position is the lenient one, the custom in Ashkenazic and some Sephardic communities is to be stringent and not cut nails during Ḥol Ha-mo’ed (Rema 532:1; Kaf Ha-ḥayim ad loc. 4). Even according to the stringent opinion, though, one who cut his nails before the festival may cut them again on Ḥol Ha-mo’ed (MA; MB ad loc. 2; AHS ad loc. 2). If one cuts his nails every Friday, he may cut them on Friday of Ḥol Ha-mo’ed as well, even if he did not cut them before the festival (Naḥalat Shiva 2:57).