It's a security theater. It's a way to sell people products based on the appearance of security, without really adding any security.
I'd be really wary about any security claims made by products that touted such security theater. And yes, according to security researcher Quarkslab, the actual security implementation in Confide seems to be severely lacking to the claims made by the app. The encryption, while using the technologies similar to those used for end to end encryption, is effectively broken and doesn't really provide the same security property as a properly implemented end to end encryption.
With that out of the way:
how does the screenshot prevention work under the hood.
They're simply checking for events/conditions that happens to coincide with a screenshot. I'm not familiar with the exact implementation on Confide, but detecting screenshot in iOS, while not straightforward, isn't that difficult. According to chpwn:
How to detect screenshots on iOS (like SnapChat)
The process is pretty simple, and relies on a quirk of iOS: taking a screenshot cancels all touches on the screen. Because of that, anything that you want to protect will require you to have the user to touch the screen to see. If that works for your purposes, the general solution is to simply intercept the touch cancellation, and quickly remove any sensitive information from the screen.
No, Confide wasn't the first to figure out a way to detect screenshot in iOS. I very highly doubt that their patent is worth anything other than marketing talk.