First, you're going to have to learn how to use OpenCV. We can't tell you everything you're going to need to know in a few forum posts. You can start
here[
^].
Next, you're going to have to dig into object recognition. Be warned, this is far from a trivial tasks.
DO NOT EXPECT TO DETECT COUNTERFEIT CURRENCY! Sure, you're going to be able to detect the obvious fakes, like someone hand drawing a note, but the stuff that counterfeiters put their pride into is going to look exactly like the real thing to your code.