Praise be to Allah.
Undoubtedly eating is one of the things that invalidate the fast. Allaah says (interpretation of the meaning):
“and eat and drink until the white thread (light) of dawn appears to you distinct from the black thread (darkness of night)”
It is well known among the Muslims that fasting means refraining from eating, drinking and intercourse, and all other things that invalidate the fast.
Majmoo’ Fataawa Shaykh al-Islam, 25/219
Eating means deliberately introducing any substance into the stomach via the mouth.
See: Haashiyat Ibn Qaasim ‘Ala al-Rawd al-Murbi’, 3/389
It is not conditional that this eating be something beneficial or that the amount be large, rather if a person swallows something that does not benefit him (such as a pearl) or he swallows a small amount of something, then he has broken his fast.
Swallowing bits of food that may be left between the teeth is regarded as eating, so it invalidates the fast.
This applies if the fasting person swallows it by choice, and is able to expel it but he swallows it deliberately. But if it has already reached his throat and he swallows it and cannot expel it, then there is no sin on him and his fast remains valid, because in all cases where a thing invalidates the fast, that is conditional upon the fasting person doing it by choice. If he does it by force or involuntarily, then his fast is valid and there is no sin on him.
We have explained that in the answer to question no. 22981.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni, 3/260:
If a person has food between his teeth, one of the following two scenarios must apply:
1 – It is a small amount that he cannot spit out, so he swallows it. This does not invalidate his fast, because it cannot be avoided. It is like saliva. Ibn al-Mundhir said: The scholars are unanimously agreed on that.
2 – It is a large amount and he can spit it out. If he spits it out there is no sin on him, but if he swallows it deliberately, his fast is invalidated according to the majority of scholars, because he has swallowed food that he could have spat out willingly when he is mindful of his fast. So this breaks the fast just as if he deliberately started eating. End quote.
To sum up the answer:
If he is able to expel it but he does not do so and he swallows it, then he has invalidated his fast. If he swallows it involuntarily, then his fast is valid and there is no sin on him.
And Allaah knows best.