"TF" is an abbreviation used in certain parts of the internet to mean "the fuck". Its origin as a recognizable acronym likelypossibly comes from the more common abbreviation "WTF", which is short for "What the fuck?" (an expression of intense confusion and possibly anger) "What the fuck?" itself sometimes is shortened to just "the fuck?" in some circumstances, as if it's too much effort to add the word "what" to the beginning because you are so bewildered.
Fuck is one of the most versatile and confusing words in the English language. It is an obscenity, (or expletive, or swear word, or just "bad word") and is almost never acceptable to be used in polite company or in the presence of children, but abbreviations such as TF can mask the obscenity and make it more acceptable to be used in larger audiences.
If you look up "fuck" in the dictionary, you are going to find a LONG list of possible meanings, and the most literal meaning (to copulate, or to have sex) will not make any sense here. You can more generally understand the word to be a very rude intensifier.
In this sentence, to "confuse the fuck out of {someone}" simply means to confuse someone very very strongly, so that they don't have any idea what is happening.
Compare: "beat the fuck out of {someone or something}", in which an extreme level of physical violence is used, or "enjoy the fuck out of {object or activity}" which means to have an extreme level of happiness from doing something.