In his book, Refactoring: Improving the Design of Existing Code, Martin Fowler talks about refactoring methods and how to apply them to codes. The refactoring techniques are a serious of transformations that are designed not to change the behavior of the code, while at the same time improve the structure of it. In one of the chapters, written in cooperation with Kent Beck, he also discusses bad code smells. Code smells are signs that show potential problems with the code, that will make the maintenance of software harder. The original paper book was published first in 1999, while it was republished as eBook in 2012. While the techniques seem to be old in term of software development, there is not too much that could change regarding to these techniques. Thus, these techniques are still highly recommended to learn them.
Since the first publishing of the book, Martin Fowler also collected a nice catalog of the refactoring transformations.
Another good resource, that explain the code smells and the step-by-step execution of the refactoring methods, can be found at https://refactoring.guru/catalog.