Well, basically it's the short version of "the fuck", obviously. It's showing up the opposite person is annoyed by the thing you're doing. Or they don't really get what are you mention of. Or in some sisuation, it's a word used for mocking ppl
Guy 1: Bruh, i fu**ked your mom last night
Guy 2: Tf?
Guy 1: *Fapping*
Guy 2: Tf r you doing?