Of course you can often refactor yourself out of a bad situation, but to do it easily you must have a set of unit tests (JUnit, NUnit or similar) to prove that the changes you are making don't break the code.
Even well-designed code can decay over time as new features are bolted on later, often by people who don't have a grasp on the big picture. Refactoring can allow you to 'tune up' older software to keep pace with new requirements, and make it more maintainable.
If you are serious about this, I'd recommend Refactoring: Improving the design of existing code by Martin Fowler. As well as showing why to refactor, when to refactor, and how to refactor, he catalogues a large number of refactoring patterns that will get you started.
But unless you have automated unit test cases you can run over and over (or are prepared to write some) you probably shouldn't even consider refactoring your application.