Debugging is a science. You collect data, make a hypothesis based on your previous experiments and data, then make predictions (and experiments) either for or against the hypothesis. Next you run the program, providing it with new and hypothetical input; then you observe its output and then either confirm or refute your original hypothesis. What follows is a short list of steps to follow to solve the bugs you invariably create in the process of program writing.
The real first step is to not write buggy code in the first place. This may seem like a no-brainer, but is important to consider. When a good chess player plays a game he is constantly thinking at least five moves ahead. With 16 different pieces, that could be more than a million different moves. Of course, the chess player doesn't need to analyze every possible move because he knows that many of them would be bad. Experienced players no longer seem to even see the possible bad moves. The same principal applies to program writing. As you become more experienced, you will make fewer and fewer mistakes that result in bugs. Eventually, you will no longer even think about the common mistakes that beginning programmers make—it will become second nature to write non-buggy code.
The first thing to do when you do encounter a bug is to find out as much as you can about it. Read the error message carefully; it will usually tell you exactly what the problem is. If you don't understand the error message, your second best resource is the Internet. Unlike in grade school, looking up an answer is not cheating in the computer industry.
After finding out as much as you can about the error, the next logical step is to fix it in your source code. If it is a simple bug, by all means dive right in.
The last step in debugging is to test your changes. If everything works correctly, then great, you're done. If not, jump back up to step one and start again. You can't fix a program unless you understand how it works or should work in the first place. Tools will help you collect data, but it can't interpret it for you, and it certainly can't fix the problem.