Debugging literally comes from de-bugging which means cleaning the bugs, flaws, errors, issues related to code and software.
Although it can be said that debugging would be best learned through real life practice of fixing errors, there are some basic knowledge and methods that can raise your awareness, save you time and make you a much more efficient debugger as well as coder.
Debugging / Testing is a huge topic in software development but as a beginner-intermediate programmer one usually needs much more primitive debugging skills and knowledge.