To Eat One's Words

If someone tells you to eat your words, don't worry, it doesn't mean you have to write what you said down and eat the piece of paper with tomato sauce (condiment may vary depending on taste).

Meaning
If you have to eat your words, it means you have been proved wrong after you made a prediction or other statement that has turned out to be spectacularly wrong and are confessing to an error.

It can also be used as a warning to someone when they stand a high chance of being proved wrong.

Use in Normal Speech
When having to confess an error

"Aaaarrrgghh! I was certain I'd got that question right! Now I've got to eat my words."

When telling someone they've been wrong

"I'm sorry, mate, you're wrong about that match ... you're going to have to eat your words now."

When warning someone that there's a high chance of failure

"You might have to eat your words ... "

If you're looking for more food idioms, look here.