The Art of Defense!
Attacking is fun isn't it? To have the initiative and force concessions from your opponent, and attacking the king in the quest to create more positional weaknesses. I agree, and so does your opponent, that is why learning defense is essential. You like to know what to do when you have the initiative, but statistically speaking the other guy will have the initiative at some point since he's fighting for it too. After all, it's better to transition into a slightly inferior but drawable endgame than a hopeless one!
What is usually meant by defense? I have personally come across two definitions:
1.The inferior side. I don't really like this definition because a player could have an initiative yet be down a piece, and after the initiative phases out the inferior side's inferiority will be apparent.
2.The side who doesn't have the initiative and being attacked. The goal is the minimize one's concessions or slip into an even worse position, and also to phase out and seize the other guy's initiative. This definition makes more sense to me.
At a very basic level defense consists of king safety. This includes principles such as not castling on an open file (only if such can be exploited or else the Sveshnikov wouldn't be a thing) and castling early (also to connect the rooks). However, this can get murky in places such as the Steinitz Variation of the King's Gambit. Luckily I found an instructive game in my database that I annotated awhile back (so excuse the flawed annotations and variations!) where I was doing a whole game study (hide the notation pane and basically a very intense guess the move where I work on positional assessment, evaluation, planning, and calculation)
As we can see king safety is quite important, especially if the lack of it can be exploited. A king can also be much safer than it appears.
A good resource for developing king safety is "Advanced Defense" software. Don't let the name that implies for 1600+ FIDE fool you, it's quite appropriate for any level (especially beginners but a refresher for more advanced players can never hurt).
Principle 2: The principle of economy. This means only use the bare minimum needed for a defensive tasks as that leaves your other pieces active enough to perform other tasks. This by no means contradicts overprotection, which is rather for flexibility and activity reasons (if many pieces defend a critical point then one could go off to perform another task if needed). If you only need two defenders why use three assuming overprotection isn't necessary?
Principle 3: Trading off the most dangerous attacking piece. What it says on the tin. I'll show another game from my guess the move collection:
Principle 4: Strengthen the lines of least resistance. One should defend their worst weakness voluntarily, and secondly the creation of fresh weaknesses should be avoided if possible, especially as far as pawn moves are concerned.
Principle 5: Prophylaxis. Stopping dangerous plans and attacks in advance. If you really don't know what to do in a position then preventing their plan is usually the best policy.
Principle 6: Sacrificing for defense. It is well known that giving up a rook for a knight on the sixth is usually worth considering. There are other examples too however. The first is an example of shameless self-promotion and not difficult to find considering the pressure I was under, and the next was from a famous Petrosian game:
I hope you all enjoyed reading this! I know it isn't pefect but just wanted to write on the topic.