Given the current Internet architecture, protocols, and service model, it is impossible to stop click fraud. To detect click fraud reliably, one must be able to determine the intent of any click. Intent is not communicated in a click.
It is possible to stop some kinds of click fraud, but what's really happening is some people have decided that certain usage patterns are "invalid" or "fraudulent" (such as some # of clicks from a (small) set of IP/useragent pairs over some (small) time period). A savvy fraudster can easily circumvent these defenses.