Refactoring is the act of going back on previously written code and making improvements to it. The improvement can include things like making the code more concise, readable, or by adding comments. You can also rewrite code to take advantage of new features. Refactoring is part of a program's life cycle that makes it more efficient. How often you refactor your code will vary program to program.