"To eat humble pie" means to be forced to apologize or face humiliation because of some error or something a person said.
The word comes from "umble pie" in medieval times. Umble pie was pie made from "umbles" - leftover organs (liver, etc.) of a cow, sheep or other animal. The word "umble" comes from an older word "numble" that meant "deer guts [or innards]". It was not very good or desirable - however, if that was all there was to eat, then a person might not have any choice.
"He was bragging about how good his team was - when they lost badly, he had to eat humble pie."