I wanted to take a stab at laymen's terms for this...
zk-SNARK protocols provide proof that a specified algorithm (or circuit) was run against some data. I want to prove I know public w and private x such that f(x, w) = 1, but I don't want to give you x. I input x and w into f and f spits out 1, while the zk-SNARK part of the protocol will generate a signature that says I just did all that with that public input and that output, so I must have a valid private input.
Another practical application I've seen described is that you want to know the mayoral candidate's DNA is not among the database of DNA found at crime scenes. The candidate naturally does not want to give everyone his DNA, so how can we know he's not in that database? You could design a zk-SNARK protocol where there is an algorithm that checks the input DNA against the database and outputs 1 if match and 0 if no match. You let the cops run that algorithm in private and then they come forward and present a zk-SNARK proof that shows they ran the algorithm and got output 0--this would reliably prove that the cops checked the database for his DNA and the output was no match.
So I think of it is as proof that I went through the circuit.
I found this very helpful:
and this perhaps too cute tweet is helpful as well:
Intuitively it seems like there would be plenty of ways for the client to alter the program code in order to produce output which could be used to fake their identity.
Well...I'm still working my way through Vitalik Buterin's paper that so far does a good job describing what's going on under the hood. As I have begun to understand it, it's kind of like this:
Take the function f and turn it into a special circuit where each operation is like a gate, with a special encoding. When the operations are run together the compounded encodings of each gate can be converted to form some polynomial that is difficult to guess--anything that runs through the operations in order will have generated that polynomial, and anything that did something different or went out of step will not be able to generate that polynomial.
An analogue in meatspace might be one of those scavenger hunts where each clue builds on the last, so you need to get each point in order. If you get to the end, you get a key that locks a lockbox. If you give that locked lockbox to someone, it doesn't matter what you put in it, you've proven that you went through all the steps to get there. Only in this analogy, think of each of those clues as a computer operation.
The polynomial generated by going through the circuit is then used to create a public and private key pair. When you run your input through the circuit the zk-SNARK protocol will give you a proof $\pi$ that has encrypted your private input and public input with the private key for that function. This is your proof that you went through the function with those inputs.
I'm sure I'm missing key parts of this so I'd welcome corrections. As someone trying to learn what's going on w/ zk-SNARKs, I can attest that many people do not succeed in explaining it well.