The polite version of the more common term “What the fuck”.
Additional info: “Pardon” itself can be used instead of just asking “what”.
Josh: Hey man, look at my poop stain on my chair.
Jacob: Pardon the fuck?
Josh: Wow, you‘re so polite.
Jacob: Yes, I indeed am.