“He swears that it wasn't him.”
Someone in your office drew a funny picture on the whiteboard. Everyone wants to know who did it. You suggest that it was Mike, but someone says they already asked, and it wasn't him.
He swears that it wasn't him.
If someone insists or promises something, you can say they “swear” it. Usually someone “swears” in support of an idea that is hard to believe.
My aunt swears she used to hear ghosts at night.
He swears nothing happened and that they’re just friends. I really don’t know.
Notice that you can use “that” before the clause, but in spoken English it’s not necessary.
Use this phrase when you get blamed for a mistake, an accident, or a crime, but you didn't do it:
It wasn't me! I swear!