I somewhat disagree with the answers given so far. There are great differences among mathematicians (at the cultural level, and also at the individual level) in their attitude to errors in written work. Some people -- dare I mention continental Europeans? -- are really distressed by coming across a false statement in a paper. It makes them think that the author is at best "sloppy"; worse, there is the risk that an error that looks silly to you may cause the referee to lose confidence in your work.
Also remember that you know what you meant 100 times more than anyone else, and someone who is struggling to understand an argument which is new to them may not be so willing to correct a trivial error. In the intermediate level graduate course I am teaching now I am writing up all of my own notes and my own exercises. Several students in my class write to me periodically to point out trivial errors in my notes: e.g. missing "not"s and such things. Indeed, I encourage them to do so, because I know that these errors still give my students some trouble: their guesses at what I meant to say are usually correct, but they lack conviction and are thus somewhat nervous that they are misinterpreting something.
So I would say that if you discover that you have made an error in your paper -- again, I mean an incorrect mathematical statement, not a missing citation or a piece of exposition that you have found is more obscure than you wanted -- then you should contact the editor promptly. If it is easy to correct the error, do so, and enclose the new version of the paper and/or link to your homepage. The editor and the referee can decide what is truly minor.
Of course, when you contact the editor to say that you have corrected something and made a new version, it's a great time to recheck the rest of the paper. Sending one or two such "author generated revisions" on a given paper is (in my opinion, of course) being a diligent author. More than that really does risk annoying and eroding the confidence of the editor and referee.
Addendum: I see from the comments that Kevin Buzzard has expressed the opposite opinion, and he -- unlike me -- is an editor (although I have been a referee many times over and do not mind receiving an unsolicited revision). So now I'm thinking that the correct answer may depend upon the editor, and that there is no one best policy.