Learn how to attack, so when defending you know what to guard against.
Defense can be difficult to play, but I'm wondering if what you really want is to play more solidly. First thing that may be surprising, is if you bring out your pieces quickly in the opening, and find useful squares for them (in touch with center squares for example), your opponent will have very few tactical things to do to you. So you may want to start by checking to see if your opponent has an immediate threat, then check if you have an immediate win, and if both are false then find your most inactive piece and improve its position.
You may also note how strong players keep all their pieces defending eachother. Not that good coordination is as easy as saying "I'll do that too" but it's something to keep in mind... don't leave pieces undefended. Undefended pieces iare the most elementary seed that sprouts tactics in a position. Forgot who said the quote: "loose pieces fall off"
The danger of not following these can actually seem fairly innocuous most of the time, at least to inexperianced players. But if you don't follow fundamentals like these then after some trades, or after the position is opened it will seem like tactics just keep appearing for your opponent from nowhere.
Anyone out there willing to teach me how to play a defensive game?