What does Foil Mean?

There are several meanings of the word foil. It can be name of a slim sword used in fencing. It can also mean that you’ve prevented something from happening like a terrorist attack or a wedding. There’s also the aluminum kind of foil.