A function or method is meant to only accomplish ONE purpose. If the functions is called add(x, y) you can't have the function add the numbers and then divide them. These are two separate operations.
Also, to reiterate what was said by Timothy, if you feel the need to comment your function (other than the function header documentation), there's a good chance it is too complicated.
Also, an even more general rule of thumb that can be useful to keep in mind is that your functions probably don't need to be longer than 35 lines.